python - ImportError with VirtualEnv -


i'm trying use virtualenv flask app i'm creating since has recommended me so. after creating virtual environment, installed libraries needed using pip while environment activated. i'm running importerror problems script. code works fine when i'm not in virtual environment.

my script:

#!/usr/bin/python  import sc2reader ... ... 

when try run this:

(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've tried changing shebang reflect virtualenv path python, didn't fix anything. library found in site-packages folder in virtual environment, i'm not sure why i'm getting importerror.

i've never used virtualenv before i'm assuming configured wrong it's not seeing site-packages.

try using

#!/usr/bin/env python 

as shebang. if not work, try seeing output of which python.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -