I am new to python and I am trying django framework that involves some MySql and ran into this error when try to do pip install mysqlclient
and down the lines o
currently the mysql-connector for python 3.7 is not available in official wesite but u can fix this issue by installing wheel with specific windows and python version.
this solutionpip install (ex/dir)/mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl
for win 64-bi and python 3.7
check the link below and download the specific wheel for your system. download and install the wheel for specific version by using "pip install (full path with file name in my case ex:-"pip install C:\Users\%user%\Downloads\mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl")
You have to install "mysqlclient-1.4.1-cp37-cp37m-win32.whl" (32bit) file
if your file is in Downloads folder write the command in your cmd
i. cd C:\Users\Nour Noby\Downloads
["Nour Noby" should be changed ]
ii. pip install mysqlclient-1.4.1-cp37-cp37m-win32.whl
["mysqlclient-1.4.1-cp37-cp37m-win32.whl" should be replaced with your downloaded filename ].
In my case, I had the 32-bit version of Python installed, instead of the 64-bit one. Install 64-bit Python and it would work alright.
You need to install the following dependencies before installing mysqlclient for python 3.7 in your system.
sudo apt-get install python3.7-dev default-libmysqlclient-dev
I hope this will help you.
As of 2019, here is how to run smoothly pip install mysqlclient
on MacOS:
brew info openssl
and follow the commands at the bottom
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
Other approaches:
brew install/upgrade/reinstall mysql
: did not fix the issue for me, but has the nice side effect to make sure your installation is clean.brew install mysql-connector-c
: to make that work you have to unlink mysql, which ruins your setup and it did not fix the issue for me.