I have both python2.7
and python3.2
installed in Ubuntu 12.04
.
The symbolic link python
links to python2.7
.
When I type:
sudo pip install package-name
It will default install python2
version of package-name
.
Some package supports both python2
and python3
.
How to install python3
version of package-name
via pip
?
The easiest way to install latest
pip2
/pip3
and corresponding packages:Note: please run these commands as
root
Well, on ubuntu 13.10/14.04, things are a little different.
Install
Install packages
NOT
pip-3.3 install
Another way to install python3 is using wget. Below are the steps for installation.
Also,one can create an alias for the same using
Now open a new terminal and type py and press Enter.
If you have pip installed in both pythons, and both are in your path, just use:
References:
This is a duplicate of question #2812520