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
I installed it with the following command and works well now (on Mac):
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient
see connected answer: Error installing mysql-python: library not found for -lssl
Try this first
sudo apt-get install python3.7-dev
Then
pip install mysqlclient
ensuring you have had done the needful with python...
and installing on the global level... (not virtual environment)
sudo apt-get install mysql-server
pip install --upgrade setuptools
I had come across the same problem, because I installed default Python2.7.15, and python3 would break even after doing the needful for Python (being python2)
something that worked for me was (effectively the last one is what made it work, but i think they were equally required on my virtualenvironment with python3)
sudo apt-get install libmysqlclient-dev
sudo apt-get install python3-pymysql
sudo apt-get install python3.6-dev
python3.7 in your case in the virtualenv
I also had to go through..
I installed the following library on Ubuntu and after that, the issue got resolved.
sudo apt-get install libssl-dev
and then I was able to install mysqlclient using the following command
pip install mysqlclient
Use Anaconda and execute
conda install mysqlclient
use this command :
sudo apt-get install libssl-dev