sudo yum install python-pip python-wheel
sudo yum install python3 python3-wheel
sudo dnf upgrade python-setuptools
sudo dnf install python-pip python-wheel
sudo dnf install python3 python3-wheel
sudo zypper install python-pip python-setuptools python-wheel
sudo zypper install python3-pip python3-setuptools python3-wheel
If you are a Raspberry Pi user, the most recommended operating system is Raspbian because it is the official operating system designed and powered by the Raspberry Pi Foundation.
Starting with Raspbian Jessie , if you are using Jessie, PIP is installed by default. This is definitely one of the important reasons for you to upgrade to Raspbian Jessie instead of sticking with Raspbian Wheezy or Raspbian Jessie Lite. However, if you are using an older version of Raspbian, you can still install PIP as follows:
sudo apt-get install python-pip
sudo apt-get install python3-pip
For Raspbian, Python 2.x users should use pip while Python 3.x users should use pip3 when running the PIP command.
Although PIP does not update regularly, it is important that the app stays on top of the new versions because PIP can have bug fixes, compatibility issues and security holes. Fortunately, upgrading PIP is quick and simple.
python -m pip install -U pip
pip install -U pip
On certain versions of Linux and Raspberry Pi, you need to use pip3 instead.
When PIP is ready, you can start installing packages from PyPI:
pip install package-name
To install a specific version of the package:
pip install package-name==1.0.0
Search for a specific PyPI package:
pip search "query"
See details about an installed package:
pip show package-name
List all installed packages:
pip list
List all outdated packages:
pip list --outdated
Upgrade obsolete package:
pip install package-name --upgrade
Note : PIP will automatically delete older versions of packages when it has been upgraded to a newer version.
Completely reinstalling a package:
pip install package-name --upgrade --force-reinstall
Exit a package:
pip uninstall package-name
Python is very interesting. Quantrimang recommends that you learn more about Python to be motivated to continue learning and to push your skills to new heights. You can refer to some of the following articles: