Question

I am trying to setup virtualenv to keep my python env clean and organized. Well, actually I'm trying to install scrapy as I wrote about here which opened this can of python worms that I'm now trying cleanup after will virtualenv.

The final verdict was to install virtualenv (which is failing) and hence this post. This is where I'm at:

$ virtualenv test
-bash: virtualenv: command not found

I understand that this means wherever virtualenv installed via pip install virtualenv isn't in my path but it should be after following these:

  1. Can't pip install virtualenv in OS X 10.8 with brewed python 2.7

  2. http://hackercodex.com/guide/python-development-environment-on-mac-osx/

  3. https://github.com/Homebrew/homebrew/issues/12667#issuecomment-6257342

  4. http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/

  5. Delete all virtualenv and start from scratch

brew doctor returns ready to brew.

My guess is that my system python and my brew python aren't playing nicely but I'm out of ideas as to what else I can do to fix this.

At this point I'm willing to do a clean install of just about everything (even mac os x) if that's what it takes. I'm pretty sure I sudo pip install'd something(s) a while ago and I'm paying the price for it now.

More details of the install:

~ ∮ pip install virtualenv
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages
Cleaning up...
~ ∮ pip install virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Cleaning up...

I tried both brew install python --with-brewed-openssl AND brew install python --framework (after uninstalling the previous when it wasn't working) (and all the other suggestions in the above links)

thanks in advance!

Était-ce utile?

La solution

virtualenv looks to be in the wrong place. On Mac 10.9 it should be in /usr/local/bin/virtualenv.

Try a pip uninstall on virtualenv and then reinstall again with pip, see if it puts it in the right location.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top