I have just created a virtual environment on my machine (I am running on ubuntu 18.04 LTS). I have the python version of 3.6.7 and now I want to install mysqlclient into my virtual environment.
After I do pip install mysqlclient
it didn't work, instead it gave me errors saying;
Command "python.py egg_info" failed with error code 1 in /tmp/pip-install-zd21vfb3/mysqlclient/', and that the msql_config file is not found.
My setup tools are all up to date.
First, check that you are connected to the internet and it is stable. Try to run the command again. Next, you will have to manually download and install the package if the problem persists. To do this, you can Google the binary file of mysqlclient that is compatible with your device, or you can go to this site.
This project is a fork of MySQLdb1. This project adds Python 3 support and fixed many bugs.
Pip is a helpful command line package manager and installer for Ubuntu. Using various commands, pip allows you to manage Python software packages from the Ubuntu terminal. In this tutorial, you have learned how to install pip on Ubuntu machines running both Python 2 and Python 3.
Ubuntu 18.04 has both Python 2 and Python 3 installed by default and hence it has two possible variants of PIP for each Python versions. Pip, by default, refers to the Python 2 version. Pip for Python 3 is referred to as pip3. Python 2 is deprecated and not available in Ubuntu 20.04 and higher versions.
mysqlclient
has a dependency on the mysql client & dev packages being installed. In order to fix this on ubuntu, you have to use apt-get
to install a couple of mysql packages.
In your case, it looks like the missing mysql_config
might be missing on your system. You can fix that by installing libmysqlclient-dev
on ubuntu bionic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With