Virtualenv Permission Denied

Virtualenv Permission Denied

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.

1

1 Answer

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
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.