To install a specific version of a package using pip, use the syntaxpip install package==version. For example, to install version 1.0.0 of a package named ‘sample’, usepip install sample==1.0.0. For more advanced methods, background, tips and tricks, continue reading the article. Table...
To install a specific version of a package with pip, you can use the pip install command followed by the package name and the desired version number.
Install a package: pip install package Install a specific version of a package: pip install package==version Install packages listed in a file: pip install -r path/to/requirements.txt Install packages from an URL or local file archive (.tar.gz | .whl): pip install --find-links url|path...
当你在主机系统中维护python2.x和python3.x时,你可以在Scripts文件夹下找到pip。
Install the specific version of a package: $ pip install<PACKAGE>==<VERSION> The specific versions of the packages can also be defined inrequirements.txtfile: MySQL-python==1.2.3 WebOb==1.2.3 numpy==1.11.1 Install the specific versions of the packages from therequirements.txtfile: ...
1. After installation, run the below command in the Terminal toupgrade Pipto the latest version on Windows. Here’s what the syntax looks like: python -m pip install -U pip 2. In case you want todowngrade Pipto a specific version, run the below command: ...
The syntax that installs a specific version of a package in Python using pip: pip install <PACKAGE>==<VERSION>, this is the general syntax that users can use for installing a specific package in Python. As users might understand, now, they exchange "<PACKAGE>" and "<VERSION>" with the...
Later in this tutorial, you’ll learn how to use a requirements.txt file to install many packages at once.Note: Unless the specific version number of a package is relevant to this tutorial, you’ll notice the version string takes the generic form of x.y.z. This is a placeholder format...
pip install package-name Copy Replace the package name with the name of the package you want to install. For example, you would use pip install requests to install the requests package. By default, pip installs the latest version of the package. If you want to install a specific version,...
Install pipx as a Standalone Tool Configure pipx Before the First Run Turn PyPI Into an App Marketplace Run Single-Use Python Apps Install Python Apps Globally Manage Your Installed Apps List the Installed Apps Upgrade Apps to Their Latest Versions Downgrade Apps to a Specific Version Uninstall...