I’m having trouble with virtualenv in Lion. I’ve clean reinstalled Virtualenv and Pip it but it seems like it’s struggling with finding Pip when creating a new environment. I removed virtualenvwrapper to make sure that’s not interfering too.
Unfortunately the path it’s looking in seems to be truncated in the error message.
The environment gets part created but there’s no activate script. This is the traceback:
Apollos-Mac-mini:~ apollo$ virtualenv test
New python executable in test/bin/python
Installing setuptools............done.
Installing pip.............
Complete output from command /Users/apollo/test/bin/python /Users/apollo/test/bin/easy_install /Library/Python/2.7/...ort/pip-1.0.2.tar.gz:
Processing pip-1.0.2.tar.gz
Running pip-1.0.2/setup.py -q bdist_egg --dist-dir /var/folders/61/08st3n995qn_w6rsjqgv1cx00000gn/T/easy_install-Za9IA8/pip-1.0.2/egg-dist-tmp-lyVJEQ
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
warning: build_py: byte-compiling is disabled, skipping.
warning: install_lib: byte-compiling is disabled, skipping.
error: byte-compiling is disabled.
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.6.4', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv.py", line 810, in main
never_download=options.never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 912, 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 648, in install_pip
filter_stdout=_filter_setup)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 878, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/apollo/test/bin/python /Users/apollo/test/bin/easy_install /Library/Python/2.7/...ort/pip-1.0.2.tar.gz failed with error code 1
Tim: you are probably right from what I can see from this link – https://bitbucket.org/tarek/distribute/issue/168/easy_install-fails-with-byte-compiling
There’s another interesting note at the end of the link which you might want to check out. It says
“Setting export VIRTUALENV_USE_DISTRIBUTE=1 fixed the problem.”
I would recommend that you use distribute to install your packages as it seems to give me a lot less trouble than the traditional setuptools. Using the –distribute option like this:-
In any case, glad you solved your own question! 🙂