I am trying to use mysql with python SQLAlchemy however python fails to install MySQL or even recognize it is installed. Below are the details:
I'm running this on Windows 10 64 bit and Anaconda Python 3.6.5
I downloaded MySQL through MAMP: Mac-Apace-MySQL-PHP https://www.mamp.info/en/
I have tried running my code on VSC and Jupyter.
If I try running the code
pip install mysqlclient
_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 tried
pip install MySQL-python
but get_mysql.c _mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.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 tried
pip install MySQLdb
and get:Collecting MySQLdb Could not find a version that satisfies the requirement MySQLdb (from versions: ) No matching distribution found for MySQLdb
I tried installing MySQL - from the actual Oracle website, did not work
I tried downloading the MySQL-connector to python: I get python v3.6 not found. we only support python using MSI.
I heave searched this issue on SoF but every issue is either outdated or custom geared towards that poster's case and I honestly would not know where to start. I've read that it may be a config issue to where python can't tell where MySQL is located and so I need to customize the path to it but I do not have the technical depth to meddle with that as I'm worried I may end up making it even worst.
I sincerely appreciate any input to this matter as I am truly in a bind and have no idea where to go from here.
mysql.h
and friends come from. On Linux/macOS this is straightforward, you just install the right package, but I'm not sure what the equivalent is for MAMP on Windows. The key is to find the "development headers" before attempting topip install
anything that depends on them. – tadman Jun 30 '18 at 22:38