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?
Have you installed it using sudo? Was the error in my case.
If you execute
pip install virtualenvwrapper
without sudo as a normal user pip will run but won't copy the files in the required locations because the lack of permissions.Use sudo and the files will be created under their respective paths:
Worked for me on Debian GNU/Linux 9
did you already try this ?
Although this is an OS X question, here's what worked for me on Linux (Red Hat).
My virtualwrapper.sh was in
This is probably because I installed virtualenvwrapper locally, using the
--user
flag......as an alternative to the risky practice of using
sudo pip
.The exact path where virtualenvwrapper.sh is stored/located varies from OS to OS. Even with in same OS, it varies from version to version. So we need a generic solution that works for all OS versions.
Easiest way I have found to find its path is: Do
This will prompt a confirmation. Say "No" But first line of confirmation shows the path of virtualenvwrapper.sh (Prompt gives a list of files it will delete, if you say Yes. First entry in this list contains path to virtualenvwrapper.sh in your machine)
Using
I got a TON of "permissions denied"s, and exactly one printout of the file location. I missed it until I found that file location when I uninstall/installed it again with pip.
In case you were curious, it was in