5

EDIT2: OK this is weird. (I can't answer my own question, so I just put it as another edit to the question. I think it has something to do with the fact that I tried to do this installation within a Dropbox-synced directory. I got this to work on my Desktop. Can anyone explain why this is the case?

Original question:

I'm trying to do Heroku's Python setup tutorial (http://devcenter.heroku.com/articles/python), on my Mac OS X (Lion), but I get caught up with the step of creating a virtualenv.

So what I did was this in the command line (not using sudo caused permissions error):

sudo pip install virtualenv

But then, when I do "virtualenv venv --distribute" (I also tried with sudo), I get the following error:

New python executable in venv/bin/python
Installing distribute..............................................................................................................................................................................................................................................................................................done.
Installing pip...
  Error [Errno 2] No such file or directory while executing command /Users/AndyFang/Drop...env/bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 8, in <module>
    load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 928, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1042, 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 640, in install_pip
    filter_stdout=_filter_setup)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 966, in call_subprocess
    cwd=cwd, env=env)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Not really sure what to do. It seemed like I didn't have easy_install on my Mac, but I do have it... I'm not sure what the deal is?

EDIT: I also just tried installing virtualenv with easy_install, but I get the exact same error.

4
  • This seems like the error Error [Errno 2] No such file or directory while executing command /Users/AndyFang/Drop...env/bin/easy_install Commented Feb 18, 2012 at 7:21
  • I know that's the error, I just don't know how to solve it Commented Feb 18, 2012 at 7:25
  • Try installing easy_install in your virtualenv. Commented Feb 18, 2012 at 7:26
  • I already tried doing that to no avail Commented Feb 18, 2012 at 7:27

2 Answers 2

5

If your problem is the same as mine, then it's because there's a space somewhere in the path to your Dropbox-synced folder.

Sign up to request clarification or add additional context in comments.

1 Comment

While not in a Dropbox folder, I had the same issue. Changed spaces to underscores in directory names and it worked.
3

Virtualenvs aren't portable, so you can't keep them synced across multiple machines if the paths don't match up.

In general, it's a bad idea :)

3 Comments

I'm not really concerned about syncing the virtualenv. I'm more frustrated with the fact that I cannot have my Django project that I push to Heroku within my Dropbox folder.
Putting Git repos in a Dropbox folder is a recipe for disaster.
@KennethReitz Can you explain why it's a bad idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.