Why am I getting this error (related to pip and easy_install) when trying to configure virtualenv?

I am trying to create a Flask app to click on Heroku. When I try to create virtualenv in a folder, I will throw this error:

photo-crawl โ€บ sudo virtualenv venv --distribute Password: New python executable in venv/bin/python Installing distribute............................................................................................................................................................................................................................done. Installing pip.... Complete output from command /Users/evansiegel/In...rawl/venv/bin/python -x /Users/evansiegel/In...env/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz: /Users/evansiegel/Involvio/photo-crawl/venv/bin/python: can't open file '/Users/evansiegel/Involvio/photo-crawl/venv/bin/easy_install': [Errno 2] No such file or directory ---------------------------------------- ...Installing pip...done. Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 9, in <module> load_entry_point('virtualenv==1.8.4', 'console_scripts', 'virtualenv')() File "/Library/Python/2.7/site-packages/virtualenv.py", line 964, in main never_download=options.never_download) File "/Library/Python/2.7/site-packages/virtualenv.py", line 1076, in create_environment install_pip(py_executable, search_dirs=search_dirs, never_download=never_download) File "/Library/Python/2.7/site-packages/virtualenv.py", line 667, in install_pip filter_stdout=_filter_setup) File "/Library/Python/2.7/site-packages/virtualenv.py", line 1042, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /Users/evansiegel/In...rawl/venv/bin/python -x /Users/evansiegel/In...env/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz failed with error code 2 

It seems that for some reason virtualenv does not put everything that should fit in the venv/bin . Right now there are only python and two aliases python2 and python2.7 .

Thanks!

+4
source share
1 answer

I believe this is caused by an error in older versions of virtualenv and / or pip. It looks like you are using virtualenv 1.8.4 and pip 1.2.1. Is it possible for you to upgrade to the latest virtual and peak (currently virtualenv 1.9.1 and pip 1.3.1)?

This should be done if you have privileges set:

 pip install pip --upgrade pip install virtualenv --upgrade 

At this point, executing the same command (i.e. sudo virtualenv venv --distribute ) should give you what you want.

+4
source

All Articles