问题
When i try do the given code below: "sudo apt-get install virtualenv" the error given in response to the ubuntu-shell is:
E: Unable to locate package virtualenv
回答1:
The Ubuntu package is called python-virtualenv, not "virtualenv".
回答2:
You need to add python before virtualenv because ubuntu package is python-virtualenv not virtualenv.
sudo apt-get install python-virtualenv
回答3:
It's also possible that you may not have run sudo apt-get update. It worked for me.
回答4:
Try This :
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install virtualenv
回答5:
you can install it with this instruction :
curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz
tar xvfz virtualenv-1.10.1.tar.gz
cd virtualenv-1.10.1
sudo python setup.py install
回答6:
sudo apt-get update
sudo apt-get install virtualenv
回答7:
Yess, if any one wants to have a look at ( installing virtualenv: a basis for the installation of ) django installation, please run this command when the shell opens up in Ubuntu:
sudo apt-get install python-setuptools
sudo apt-get install python-easy_install virtualenv
and then run the commands to simply start the instructions followed on the following link(starting from the section "Setting up a new environment"): http://www.django-rest-framework.org/tutorial/1-serialization/
来源:https://stackoverflow.com/questions/28256891/unable-to-locate-package-virtualenv-in-ubuntu-13-on-a-virtual-machine