I have easy_install
and pip
.
I had many errors on my Linux Mint 12, I just re-installed it and I want to install everything from scratch again.
This is one of the errors that I had. I received an interesting answer there:
Stop using su and sudo to run virtualenv.
You need to run virtualenv as your normal user.
You have created the virtualenv with sudo which is why you are getting these errors.
So how to install virtualenv
without using sudo
? Can i use pip
or easy_install
without using sudo
? Or is there another way?
This worked for me:
Now I can
pip install
whatever I want (except for everything that needs to compile stuff with gcc and has missing dependencies such as the python development libraries andPython.h
).Basically the idea is to install virtualenv (or any other python package) into
${HOME}/.local
. This is the most appropriate location since it is included into python path by default (and not only Python).That you do by
pip3 install virtualenv --prefix=${HOME}/.local
(you may need to expand${HOME}
). Make sure that you haveexport PATH=${HOME}/.local/bin:${PATH}
in your~/.profile
(you may need tosource ~/.profile
it if just added)The general idea is to install
virtualenv
itself globaly, i.e.sudo easy_install virtualenv
orsudo pip install virtualenv
, but then create the actual virtual environment ("run virtualenv") locally.