Thursday, September 6, 2018

How to install python3 version of package via pip on Ubuntu

By default, Ubuntu contains python 2.


Even if we install Python 3, the python 2 should not be removed as many default services and applications uses Python 3.

The pip tool, is also tagged to Python 2.

To have Python 3 version of pip tool.We need to install pip3 module.

For Python 2:
sudo apt-get install python-pip
For Python 3:
sudo apt-get install python3-pip
 
To install packages for one version of Python or the other, simply use the following for Python 2:
pip install <package> or for Python 3:
pip3 install <package>
 
Reference: StackOverFlow And StackOverFlow

No comments:

Post a Comment