Where is virtualenvwrapper.sh after pip install?
Solution 1
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
Solution 2
did you already try this ?
$ which virtualenvwrapper.sh
Solution 3
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
pip uninstall virtualenvwrapper
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)
Solution 4
I just reinstalled it with pip.
sudo pip uninstall virtualenvwrapper
sudo pip install virtualenvwrapper
And this time it put it in /usr/local/bin.
Solution 5
or, like I did..just uninstall virtualenvwrapper
sudo pip uninstall virtualenvwrapper
and then install it with easy_install
sudo easy_install virtualenvwrapper
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
find / -name virtualenvwrapper.sh
zakdances
Updated on May 15, 2020Comments
-
zakdances about 4 years
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?
-
Hartley Brody over 2 yearsFor me, since I used
pyenv global 3.9.1
to set my default system python before runningpip install virtualenvwrapper
, the file ended up getting installed at~/.pyenv/versions/3.9.1/bin/virtualenvwrapper.sh
. Hope that helps anyone else using pyenv!
-
-
zakdances over 11 years
No such file or directory
I also browsed the /usr/local/bin directory and couldn't find anything that looked related to virtualenv or virtualenvwrapper -
zakdances almost 11 yearsthis works, but why doesn't
which virtualenvwrapper
work? Isn't that the name of the command in the environmental variables? -
Tim almost 11 yearsTo help anybody else asking this same question about why
which
doesn't work, it's because virtualenvwrapper is actually using its custom bash completion file to add purely virtual commands, of which the commonvirtualenvwrapper
command is one. Consequently, there is no physical file on the drive forwhich
to point to. -
Serhii Holinei over 10 yearsWorked for me. Thanks
-
psycat about 9 yearsto get rid of 'permission denied' you can redirect STDERR to /dev/null. For example: $ find / -name virtualenvwrapper.sh 2>/dev/null
-
tenfishsticks about 9 years@yourfriendzak, the bash script
virtualenvwrapper.sh
needs to be sourced in your shell before any of the commands (mkvirtualenv
,rmvirtualenv
, etc.) are available, i.e.$ source /path/to/virtualenvwrapper.sh
-
eddiemoya almost 9 yearsThis worked for me on Ubuntu, also allowing
which virtualenvwrapper.sh
to work, which had been returning nothing until I did this. -
tomaskazemekas about 8 yearsAfter this command on Fedora 23 I have found virtualenvwrapper.sh only in usr/bin .
-
hermgerm almost 8 yearsHad initially installed it with
apt-get
and it landed in/usr/share/virtualenvwrapper/virtualenvwrapper.sh
, then purged it and did your trick. -
Siladittya over 6 yearsThis happened for me too. :(
-
danagerous over 6 yearsThis was much faster than
find
but both worked. Mine was located inusr/local/bin
on OS X. -
whyisyoung about 6 yearsIt didn't work for me. I'm using Python 2.7.14 with Virtualenv 15.1.0 , virtualenvwrapper 4.8.2.
-
Anuj Gupta about 6 years@whyisyoung : seriously? can you send me the screen shot right after you run "pip uninstall virtualenvwrapper"
-
Alan over 5 yearsThis worked for me in Ubuntu 14.04 if you
find / -name xxxx.sh
didn't find anything. -
Mahesh Vemula about 5 yearsNice shortcut. I am using this even for other libraries. Thank!
-
Reuel Ribeiro about 4 yearsOn Manjaro, arch based, it was also located under
/usr/bin
instead of/usr/local/bin
. I don't know why. -
MiGu3X over 3 yearsSame for ubuntu 20.04
-
robertspierre over 3 yearsOn Ubuntu 20.10, it is also installed in
~/.local/bin/virtualenvwrapper.sh
-
Karan Singh over 3 yearsOn Ubuntu 16.04, it is installed in ~/.local/bin/virtualenvwrapper.sh