Hi,
I want to use a specific module saved in my virtualenv called scrapetest.
I followed the information in the help section Save & Run with virtualenvs (https://help.pythonanywhere.com/pages/SaveAndRunPythonVersion/):
I set the shebang line to the path of my python executable in my file called test.py: Full code below
#!/home/jahmul14/.virtualenvs/scraptest/bin/python3.4
import sys
print (sys.version)
print (sys.path)
import geocoder
g = geocoder.google('Mountain View, CA')
I saved the file and run it, but I get an import error.
3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4]
['/home/jahmul14/.virtualenvs/scrapetest', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dyn
load', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages']
Traceback (most recent call last):
File "/home/jahmul14/.virtualenvs/scrapetest/test.py", line 18, in <module>
import geocoder
ImportError: No module named 'geocoder'
When I activate my virtualenv from the bash console I am able to import the module and no error.
Did I set the shebang line incorrectly or is the sys.path not set right?