views:

32

answers:

1

So I'm not sure what my problem is. Trying to configure a virtualenv this is the error I get:

20:59:51 $ virtualenv test -p /usr/local/bin/python

Running virtualenv with interpreter /usr/local/bin/python
New python executable in test/bin/python
Please make sure you remove any previous custom paths from your /Users/nlang/.pydistutils.cfg file.
Overwriting test/lib/python2.6/distutils/__init__.py with new content
Installing setuptools...............done.
  Complete output from command /Users/nlang/Code/Python/venvs...ython /Users/nlang/Code/Python/venvs...stall /Library/Python/2.6/site-packa...ar.gz:
  /Users/nlang/Code/Python/venvs/test/bin/python: can't open file '/Users/nlang/Code/Python/venvs/test/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 1489, in <module>
    main()
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 526, in main
    use_distribute=options.use_distribute)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 618, in create_environment
    install_pip(py_executable)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 390, in install_pip
    filter_stdout=_filter_setup)
  File "/Library/Python/2.6/site-packages/virtualenv-1.4.9-py2.6.egg/virtualenv.py", line 587, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/nlang/Code/Python/venvs...ython /Users/nlang/Code/Python/venvs...stall /Library/Python/2.6/site-packa...ar.gz failed with error code 2

I've poked around various forums and google and have been unsuccessful in getting a virtualenv created. I'm stuck :(

Thanks

A: 

It's hard to tell exactly what's going on from the truncated output provided but it appears you are trying to update an existing virtual environment (note the Overwriting message). First, verify that the python at /usr/local/bin/python works correctly on its own. Then, try creating a virtualenv in a new (non-existing) directory (something other than test). If that doesn't work, edit your question to add the output from both.

Ned Deily
Ned, Thanks for your response.I tried to create a new virtual env, and not I'm getting all sorts of messed up.I've somehow borked stuptools, and can't easy_install anything. I'm actually contemplating rebuilding my machine...easy_install is screwed up, homebrew isn't installing anything...I think it'll be a good project for me to work for tomorrow since it's a holiday. Thanks for your help anyway
Nick Lang