xxxxxxxxxx
py -3.7 -m pip install opencv-python
xxxxxxxxxx
# To install a specific version of a package using pip:
pip install Package_name==version
# Example:
pip install MySQL_python==1.2.2
xxxxxxxxxx
# install a package to a specific version of python
python<version> -m pip install <package_name>
xxxxxxxxxx
# 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
xxxxxxxxxx
# 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
xxxxxxxxxx
(tutorial-env) $ python -m pip install requests==2.6.0
Collecting requests==2.6.0
Using cached requests-2.6.0-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.6.0
xxxxxxxxxx
pip install Package_name==version
# Example:
pip install MySQL_python==1.2.2