I am using ubuntu 12.04 and I am trying to pip install virtualenv but suddenly I got this error.
samuel@sampc:~$ pip install virtualenv
Downloading/unpacking
First, sudo pip install 'package-name' means nothing it will return
sudo: pip: command not found
You get the Permission denied, you shouldn't use pip install as root anyway. You can just install the packages into your own user like mentionned above with
pip install 'package-name' --user
and it will work as you intend. If you need it in any other user just run the same command and you'll be good to go.