![]() ![]() ![]() As only a single version can be installed at the same time different version installation will uninstall currently installed version. We can also remove the specific package version with the pip command. $ pip3 install -force-reinstall -user django=2.2.1 Remove Specific Package Version with pip Command We can force the installation with the -force-reinstall option. If there are some minor problems related to the installation, dependency, etc. $ pip install django < 2 Install Package Version Which Is In Specified Range with pip Command Force Installation of Specific Package Version with pip Command This will select the latest version which complies with the given expression and install it. But we can also specify the version range with the >= or <=. In the previous example, we have installed a specific django version. Install Package Version Which Is In Specified Range with pip Command $ pip3 install -user django=2.2.1 Install Specific Package Version with pip Commandįrom the screenshot, we see that the currently installed recent Django version is uninstalled automatically. We will also use the -user option in order to prevent other system users package downgrade. We will use a double equation sign to specify the version. In this example, we will install the Django version 2.2.1 which is not recent. We will specify the version we want to install with the equal sign. We will install a specific version of the Django Python package with pip. $ pip show django Show Package Information and Version Install Specific Package Version with pip Command (alpha-venv) python3 -m pip install pandas<1. The inversion information is important because we will install a specific version or downgrade the Python package. But if you want to install a specific version of the package, you need to use this command: (alpha-venv) python3 -m pip install pandas1.1.1 Now, let’s see how we can tell pipthat we are going to install any version of pandas before version 1.2. We can show the Python package information like name, version, etc. $ pip search django Search Package Show Package Information and Version We will use search command in this example. Search Packageīefore installing a specific version of the Python package we can search the package for its complete name and version information. In this tutorial, we will learn how to install a specific version of a Python package with the pip command. pip can be used for both PYython2 and Python3. Pip is the most popular tool and the command used to install 3rd party packages into Python. ![]()
0 Comments
Leave a Reply. |