Answers for "pip install specific version of package"

16

pip install specific version

# To install a specific version of a package using pip:
pip install Package_name==version

# Example:
pip install MySQL_python==1.2.2
Posted by: Guest on March-16-2020
1

update pip

sudo pip3 install --upgrade pip
Posted by: Guest on June-23-2020
10

how to pip install a specific version

# At the time of writing this numpy is in version 1.19.x
# This statement below will install numpy version 1.18.1
python -m pip install numpy==1.18.1
Posted by: Guest on July-12-2020
0

import specific version of package python

# adapted from answer given by Stack Overflow user in the source link

import pkg_resources
pkg_resources.require("your_package==its_version")
import your_package
Posted by: Guest on July-02-2021

Code answers related to "pip install specific version of package"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language