简体   繁体   中英

Virtualenvwrapper can't find virtualenv on Mavericks

Installed virtualenv and virtualenvwrapper via pip (globally.) All other python (2.7) packages/binaries/libraries are installed/managed via MacPorts (including pip.)

virtualenv in not on the PATH because pip installs it to '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'. I get errors when running virtualenvwrapper commands saying that virtualenv can't be found on PATH. But I'm confused why adding this directory to the PATH is not mentioned anywhere (blogs, virtualenv site, virtualenvwrapper site, here) so it feels like I'm missing something. I don't want to add this directory to the path because it feels like it's going to affect my system when I switch python versions depending upon what I'm working on...

So how do I fix this?

There are versions of virtualenv and virtualenv in both pip and MacPorts. The virtualenv site suggests installing virtualenv/-wrapper via pip; however, I assume the MacPorts version(s) would not have this problem.

The MacPorts version of virtualenv is in fact select-able between different versions by using eg:

port select --set virtualenv virtualenv27

However, there select command does not work for virtualenvwrapper , because the group 'virtualenvwrapper' does not exist.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM