Home >Database >Mysql Tutorial >How to Fix the 'Cannot open include file: 'config-win.h'' Error During MySQL-Python Connector Installation?

How to Fix the 'Cannot open include file: 'config-win.h'' Error During MySQL-Python Connector Installation?

Patricia Arquette
Patricia ArquetteOriginal
2024-12-03 01:30:12507browse

How to Fix the

Resolving the "Cannot open include file: 'config-win.h'" Error for MySQL-Python Connector Installation

When attempting to install the MySQL-python connector via "pip install mysql-python," users may encounter the following error: "Cannot open include file: 'config-win.h'". This issue can arise even after successfully installing Visual Studio C .

64-Bit Windows Solution:

  1. Install using Wheel:
pip install wheel
  1. Download from an Alternative Source:

Visit the following website:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

For Python 3.x, download and install:

pip install mysqlclient-1.3.8-cp36-cp36m-win_amd64.whl

For Python 2.7, download and install:

pip install mysqlclient-1.3.8-cp27-cp27m-win_amd64.whl

By following these steps, you can bypass the include file error and successfully install the MySQL-python connector on your 64-bit Windows machine.

The above is the detailed content of How to Fix the 'Cannot open include file: 'config-win.h'' Error During MySQL-Python Connector Installation?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn