python - AttributeError when running pip in virtualenv -


i upgraded python 2.7.6 2.7.9 using homebrew. tried 'revirtualise' existing virtual environment:

sudo virtualenv -p python2.7 existingvenv 

but getting error:

traceback (most recent call last):   file "venv.../bin/pip", line 7, in <module>     pip import main   file "venv.../lib/python2.7/site-packages/pip/__init__.py", line 9, in <module>     pip.log import logger   file "venv.../lib/python2.7/site-packages/pip/log.py", line 8, in <module>     pip import backwardcompat   file "venv.../lib/python2.7/site-packages/pip/backwardcompat/__init__.py", line 66, in <module>     urllib2 import urlerror, httperror   file "/library/frameworks/python.framework/versions/2.7/lib/python2.7/urllib2.py", line 93, in <module>     import hashlib   file "/library/frameworks/python.framework/versions/2.7/lib/python2.7/hashlib.py", line 138, in <module>     _hashlib.openssl_md_meth_names) attributeerror: 'module' object has no attribute 'openssl_md_meth_names' ---------------------------------------- ...installing setuptools, pip...done. traceback (most recent call last):   file "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 2352, in <module>     main()   file "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 825, in main     symlink=options.symlink)   file "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 993, in create_environment     install_wheel(to_install, py_executable, search_dirs)   file "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 961, in install_wheel     'pip_no_index': '1'   file "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 903, in call_subprocess     % (cmd_desc, proc.returncode)) oserror: command /users/robertelliott...hflow-app/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed error code 1 

i above error when running pip install x inside above active virtual environment.

i don't error when creating new virtualenv:

$ virtualenv -p python2.7 newvenv running virtualenv interpreter /library/frameworks/python.framework/versions/2.7/bin/python2.7 new python executable in newenv/bin/python installing setuptools, pip...done. 

is there old symlink or inside existing virtualenv causing issue , how can resolve this?

this because of new feature in python, wheel 0.24 not compatible with. you'll find folder called virtualenv_support containing base install files setuptools, pip, , wheel under python 2.7 system install. there few solutions. easiest remove wheel-0.24* virtualenv_support folder. if want go step farther, download version 0.26 of wheel .whl file , replace it.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -