How to Upgrade PIP
If you are a Python coder, There is high change that you would be using pip to install Python packages.
How To Upgrade pip On Linux
Lets see how we can upgrade pip on Linux first.
Lets check the pip version.
pip --version
Lets try installing a python package. example pip install python-levenshtein
pip install python-levenshtein
I got following warning
You are using pip version 9.0.1, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
We can also find the latest available version using following command.
pip search pip | egrep pip | egrep -i pypa
To install the version we can either run the command pip install --upgrade pip or do pip install pip==19.3.1
Lets try first pip install --upgrade pip first
pip install --upgrade pip
pip --version
Lets try now pip install pip==19.3.1
pip install pip==19.3.1
How to upgrade pip3.8
If you are using Python3+, Then you will have to update pip3 to avoid following error...
WARNING
: You are using pip version 19.2.3, however version 20.2.1 is available or WARNING
: You are using pip version 21.0.1; however, version 21.1.3 is available.
Let us check the current version of pip3.8 first.
pip3.8 --version
pip3.8 install pip==20.2.1
pip3.8 --version
Or You can upgrade using the update command as shown below...
python3.8 -m pip install --upgrade pip
How To Upgrade Pip In Windows.
If you have Cygwin installed. Then the above commands for Linux should work on Cygwin too.
Otherwise first check the pip version. Use python -m for every command
python -m pip --version
To install specific version
python -m pip install pip==19.3.1
Or use following command
python -m pip install --upgrade pip
Related Topics:
Related Notebooks
- How To Use Python Pip
- How To Convert Python List To Pandas DataFrame
- How To Install Python With Conda
- How to Plot a Histogram in Python
- How to Generate Random Numbers in Python
- How to Visualize Data Using Python - Matplotlib
- How To Read CSV File Using Python PySpark
- How To Read JSON Data Using Python Pandas
- How To Install Python TensorFlow On Centos 8