Virtualenv permission denied
8,334
sudo pip install virtualenv
The sudo
means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:
pip install virtualenv
Related videos on Youtube
Author by
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages.
root> su myuser myuser> sudo pip install virtualenv myuser> sudo pip install virtualenvwrapper
I proceeded to add this to my unix users .bashrc file.
export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7 source /usr/local/bin/virtualenvwrapper.sh
When I source .bashrc I get about 20 error lines ending with
IOError: [Errno 13] Permission denied: '/root/.virtualenvs/premkproject'
. I'm running out of ideas...I have done my homework and tried every suggested solution I could find. I'm running Ubuntu 12.04.
-
Admin over 7 yearsYou are using root or other user
-
-
CGFoX over 5 yearsThat's the exact opposite of what the answers here suggest...
-
Morifen over 5 years1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses
su myuser
to avoid being root, then usessudo
which undoes that.