I am trying to use VirtualEnv for the Flask application that I am creating, since everyone has recommended that I do this. After creating my virtual environment, I installed the libraries that I needed using pip when the environment was activated. I ran into ImportError problems with this script. The code works fine when I'm not in a virtual environment.
My script:
When I try to run it, I get the following:
(flaskapp) xxxx@xxxx-VirtualBox :~/flaskapp/bin$ ./test.py Traceback (most recent call last): File "./test.py", line 3, in <module> import sc2reader ImportError: No module named sc2reader
I tried modifying shebang to reflect my VirtualEnv path for Python, but that didn't fix anything. The library is in my site-packages folder in my virtual environment, so I'm not sure why I get ImportError.
I have never used VirtualEnv before, so I guess I configured it incorrectly so that it doesn't see my package sites.
source share