Virtualenvwrapper not found

Given what I know about Python, the problem I am facing should not occur. I installed virtualenvwrapper on Mac OS X Snow Leopard with pip. This is there in / Library / Python / 2.6 / site-packages. But when I try to import virtualenvwrapper, Python tells me that there is no such module with this name. Other modules (e.g. virtualenv) load just fine, and / Library / Python / 2.6 / site-packages is right at the top of my Python path. So is there something strange in virtualenvwrapper so that Python doesn't find it?

+4
source share
4 answers

Mine is located in /usr/local/bin/virtualwrapper.sh, but you must add this to your .bashrc, .bash_profile or .profile to install in your environment. (Remember to make the original .bashrc or open a new terminal window)

source /Library/Python/2.6/site-packages/virtualenvwrapper.sh 

EDIT Here my entire bash profile is related to pip, virtualenv and virtualenv packaging as it looks ugly like a comment

 # python export PATH=/usr/local/share/python:$PATH export PYTHONPATH=/usr/bin/python:$PYTHONPATH export PATH=/usr/local/MacPorts/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH export VIRTUALENVWRAPPER_PYTHON=/usr/local/MacPorts/Library/Frameworks/Python.framework/Versions/2.7/bin/python #virtualenv wrapper export WORKON_HOME=~/.virtualenvs # mkvirtualenv --no-site-packages myenv source /usr/local/MacPorts/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh export PIP_VIRTUALENV_BASE=$WORKON_HOME export PIP_RESPECT_VIRTUALENV=true 
0
source

Try installing virtualenvwrapper with **sudo** pip virtualenvwrapper . This may be a reference to the shell script that it installs in / usr / local / bin.

0
source

I am on Mac OS X 10.9.2 with Xcode 5.1.1 and for me the virtualenvwrapper.sh file was present in

 /usr/local/bin/virtualenvwrapper.sh 

So I just copied this to the ~/.profile file:

 source /usr/local/bin/virtualenvwrapper.sh 

And now my ~/.profile file looks something like this:

 # MacPorts Installer addition on 2014-02-23_at_17:28:39: adding an appropriate PATH variable for use with MacPorts. export PATH=/opt/local/bin:/opt/local/sbin:$PATH # Finished adapting your PATH environment variable for use with MacPorts. source /usr/local/bin/virtualenvwrapper.sh 

And now I can use virtualenvwrapper commands without any problems

Hope this helps!

0
source

This worked for me:

 source ~/.bashrc 
0
source

All Articles