• Register
0 votes

Problem :

Following is my issue: I tried to install mysqlclient like below :

C:\Users\alecxe>pip install mysqlclient Collecting mysqlclient Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1 cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz

Installed collected packages: mysqlclient

Ran setup.py install for mysqlclient

After that ran build_ext

Got below error :

building '_mysql' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual 
_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

 I am the complete beginner to this and would be very happy if any input as to how to go about fixing above error.

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had the same issue and tried all the solutions which I knew, and neither of them worked actually after long research I found the solution for the error as below:

Firstly I tried installing MySQL Connector/C from here

Secondly I tried copying MySQL Connector C 6.1 folder from the Program files/MySQL into the  Program files (x86)/MySQL

Please note that you might have to create the MySQL folder if it does not exist in your Program files (x86).

It worked for me, it seems it is for all 64-bit windows, pip or more.  Most probably mysqlclient setup script only looks for Program files (x86) folder for some MySQL files for e.g. 'mysql.h' and do not search Program files and since it did not find anything in your Program files (x86) it will raise the error !!


9 7 4
38,600 points
Thanks AbhijitJ, I was also having the similar issue, and your solution worked.
I followed all your instructions but it wont work me

Related questions

1 vote
1 answer 488 views
Problem : I have recently installed the Visual Studio 2015 on my Windows 10 laptop. I have tried to clone the repository with the solution created with the same version of Visual Studio (update 3) on my another PC, always with windows 10. But when I try to build the ... my issue? I know one thing that I can update my laptop to the same windows version but I want to avoid it for many reasons.
asked Dec 14, 2019 alecxe 7.5k points
2 votes
1 answer 2.6K views
Problem: When I try to run the below command on my command prompt: python get-pip.py It shows the following message: C:\Users\ASUS>python get-pip.py python: can't open file 'get-pip.py': [Errno 2] No such file or directory How can I have pip installed in my system. Then why am I getting this error message and why I can not open this file. Thanks in advance.
asked May 6, 2020 samhaz 5k points
0 votes
1 answer 1.6K views
Problem : I am very new to Quartz. So whenever I try to install Quartz on my system using pip install Quartz, I face the following error. Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> ... [Errno 2] No such file or directory: 'requirements.txt' I am using Mac OSX with Anaconda. Does anyone have any clue on this issue?
asked Nov 27, 2019 alecxe 7.5k points
0 votes
1 answer 14 views
I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below: gcc -Wall utilsmodule.c -o Utilc After executing the command, I get this error message: > utilsmodule.c:1:20: fatal error: ... solutions over the internet but the problem still exists. I have no problem with Python.h. I managed to locate the file on my machine.
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 1.9K views
Problem : The import matplotlib.pyplot as plt is is giving me the error with python2.7, anaconda3. The error shown is as below: ImportError: libGL.so.1: cannot open shared object file: No such file or directory The Detailed Error report is as below : Traceback ... <module> from PyQt5 import QtCore, QtGui, QtWidgets ImportError: libGL.so.1: cannot open shared object file: No such file or directory
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 756 views
Problem : While trying to import the OpenCV, using import cv2 I facing the below error: /usr/local/lib/python2.7/dist-packages/cv2/__init__.py in <module>() 12 13 # make IDE's (PyCharm) autocompletion happy ----> 14 from .cv2 import * 15 16 # wildcard import ... - I am trying to play around with the Google's new Colaboratory tool. Please let me know if someone have solution for the above issue.
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 1.5K views
Problem : I am facing following error : ImportError: libcuda.so.1: cannot open shared object file: No such file or directory Failed to load the native TensorFlow runtime. Above error comes up when I tried to import the tensorflow. Is there anybody who has faced this error before and know the solution on it?
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 6 views
0 votes
1 answer 235 views
Problem : I have installed Cuda 10.1 and cudnn on Ubuntu 18.04 for the first time and it seems to be installed properly as when I type nvcc and nvidia-smi I am getting proper response. I have also installed tensorflow using following command: user:~$ sudo ... solutions. Include the entire stack trace above this error message when asking for help. Am I missing something? How to resolve this issue?
asked Nov 27, 2019 alecxe 7.5k points