I'm trying to setup virtualenvwrapper on OSX, and all the instructions and tutorials I've found tell me to add a source command to .profile, pointing towards virtualenvwrapper.sh. I've checked all the python and site-packages directories, and I can't find any virtualenvwrapper.sh. Is this something I need to download separately? Is pip not installing correctly?
This is the contents of /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenvwrapper:
hook_loader.py hook_loader.pyc project.py project.pyc user_scripts.py user_scripts.pyc
As you can see, no virtualenvwrapper.sh. Where is it?
pip will not try to make things difficult for you on purpose.
The thing is commands based files are always installed in
/bin
folders they can be anywhere on the system path.I had the same problem and I found that I have these files in my
~/.local/bin/
folder instead of
/usr/loca/bin/
which is the common case, but I think they changed the default path to
~
or $HOMEdirectory because its more isolate for the pip installations and provides a distinction between apt-get packages and pip packages.
So coming to the point you have two choices here either you go to your .bashrc and make changes like this
and than create a directory virtualenvwrapper under
/usr/share/
and than symlink your virtualwrapper_lazy.sh like thisand you can check if your workon command is working which will list your existing virtualenv's.
You can use the
find
command to search for a file:find / -name virtualenvwrapper.sh
This will search all directories from the root for the file.
on ubuntu 12.04 LTS, installing through pip, it is installed to
/usr/local/bin/virtualenvwrapper.sh
on ubuntu 17.04, installing through pip as a normal user, it is installed to
~/.local/bin/virtualenvwrapper.sh
I just reinstalled it with pip.
And this time it put it in /usr/local/bin.
In my case (OSX El Capitan, version 10.11.5) I needed to edit the .profile like so:
In the terminal:
And then reload the profile (that it will be availuble in the current session.)
Hope it will help someone.
or, like I did..just uninstall virtualenvwrapper
and then install it with easy_install
this time I found the file "/usr/local/bin/virtualenvwrapper.sh" installed... Before that I weren't finding that file anywhere even by this command
In OS X 10.8.2, with Python 2.7:
/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh