pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv. Just make sure to upgrade pip.
On Linux or macOS:
pip install -U pip
On Windows:
python -m pip install -U pip
pip -V
// perhaps
pip --version
// result
pip 20.2.4 from c:\program files\python\python39\lib\site-packages\pip (python 3.9)
pip list
// result
Package Version
---------- -------
pip 20.2.4
setuptools 49.2.1
// pip show SomePackage Name
pip show setuptools
// result
Name: setuptools
Version: 49.2.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: [email protected]
License: UNKNOWN
Location: c:\program files\python\python39\lib\site-packages
Requires:
Required-by:
pip list -o
// result
Package Version Latest Type
---------- ------- ------ -----
setuptools 49.2.1 50.3.2 wheel
pip install --upgrade SomePackage
pip install SomePackage # The latest version
pip install SomePackage==1.0.4 # Specify the version
pip install 'SomePackage>=1.0.4' # Minimum version
For example, I want to install Python. With one of the following commands , Convenient and quick .
pip install Python==3.9
pip install --upgrade SomePackage
Upgrade the specified package , By using ==, >=, <=, >, < To specify a version number .
pip uninstall SomePackage