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.


Solution 1:

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