$PATH being ignored in python virtualenv for bin -
i have virtualenv, , in virtualenv i'm attempting run fabfile.
the fabfile starts this:
import httlib2
when try execute
fab --list
to list of available tasks, instead get:
traceback (most recent call last): file "/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/fabric/main.py", line 658, in main docstring, callables, default = load_fabfile(fabfile) file "/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/fabric/main.py", line 165, in load_fabfile imported = importer(os.path.splitext(fabfile)[0]) file "/users/user/documents/code/fabfile.py", line 5, in <module> import httplib2 importerror: no module named httplib2
yet when do:
$ python python 2.7.5 (default, aug 13 2013, 10:53:21) [gcc 4.2.1 compatible apple llvm 4.2 (clang-425.0.28)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import httplib2 >>>
it imports fine!
i checked fab being executed:
$ -a fab /users/user/.virtualenvs/myenv/bin/fab /usr/local/bin/fab /usr/local/bin/fab
and $path starts with:
$ echo $path /users/user/.virtualenvs/myenv/bin:
there i'm missing here, reason doesn't see httplib2 when execute fab. appears wrong fab being executed (i.e. not first 1 found in $path), can't explain how or why.
if pip freeze, get:
$ pip freeze fabric==1.8.3 ecdsa==0.11 httplib2==0.9 paramiko==1.12.4 pycrypto==2.6.1 wsgiref==0.1.2
any appreciated.
i don't understand why, after deactivating virtualenv , reactivating it, works fine now...
Comments
Post a Comment