Installing a Specific Version of MySQL-Python with pip
You want to install version 1.2.2 of MySQL-Python in a fresh virtual environment created with the --no-site-packages option. However, PyPI only provides version 1.2.3.
Solution:
To install the older version, use the following command:
pip install --force-reinstall -v MySQL_python==1.2.2
Explanation:
Alternative Solution (Outdated):
pip install -Iv MySQL_python==1.2.2
Note:
Using -I may cause issues with installations managed by other package managers or different versions of the package. See the Python documentation for more information on this caveat.
Additional Step:
Since the PyPI URL for MySQL-Python 1.2.2 no longer works, you may need to install it manually:
pip uninstall MySQL_python pip install -Iv http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download
The above is the detailed content of How to Install a Specific Older Version of MySQL-Python (e.g., 1.2.2) using pip?. For more information, please follow other related articles on the PHP Chinese website!