Pip is the PyPA recommended tool for installing Python packages.
Note: There is a bug in some versions of pip that disables pip after an upgrade (pip install --upgrade pip
) with the following error:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
The simplest fix I've found is to run the following command to upgrade pip by installing again the latest version (use python
instead for python2):
wget https://bootstrap.pypa.io/get-pip.py | sudo python3
wget https://bootstrap.pypa.io/get-pip.py | sudo python
wget https://bootstrap.pypa.io/get-pip.py | sudo python3