Home >Database >Mysql Tutorial >How to Solve the 'Cannot open include file: 'config-win.h'' Error During mysql-python Installation on Windows?

How to Solve the 'Cannot open include file: 'config-win.h'' Error During mysql-python Installation on Windows?

Susan Sarandon
Susan SarandonOriginal
2024-11-30 21:36:16295browse

How to Solve the

mysql-python Installation Error: Resolving 'config-win.h' Inclusion Issue

Despite successful installation on multiple platforms, users may encounter the "Cannot open include file: 'config-win.h'" error when attempting to install the mysql-python connector via pip on certain Windows machines. Here's how to resolve this issue:

For 64-bit Windows Systems:

  1. Install using Wheel:

    Execute the following command to install the wheel package:

    pip install wheel
  2. Download from a Third-Party Repository:

    Visit http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python and download the appropriate wheel file:

    • Python 3.x:

      pip install mysqlclient-1.3.8-cp36-cp36m-win_amd64.whl
    • Python 2.7:

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

The above is the detailed content of How to Solve the 'Cannot open include file: 'config-win.h'' Error During mysql-python Installation on Windows?. 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