Troubleshooting "Cannot Open Include File: config-win.h" Error in MySQL-Python Installation
When attempting to install the 'mysql-python' connector using pip, you may encounter an error stating "Cannot open include file: 'config-win.h'". This issue has been encountered on Windows machines, despite working correctly on Mac OS and other Windows systems.
Resolution:
For Windows 64-bit systems, consider the following steps:
1. Install Using Wheel
pip install wheel
2. Download from Unofficial Repository
Visit http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python and download the appropriate wheel for your Python version:
For Python 3.x:
pip install mysqlclient-1.3.8-cp36-cp36m-win_amd64.whl
For Python 2.7:
pip install mysqlclient-1.3.8-cp27-cp27m-win_amd64.whl
These steps should resolve the "Cannot open include file: config-win.h" error and enable the successful installation of the 'mysql-python' connector on 64-bit Windows systems.
The above is the detailed content of Why Can't I Install mysql-python on Windows? (Cannot Open Include File: config-win.h). For more information, please follow other related articles on the PHP Chinese website!