Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output while installing mysqlclient [duplicate]

Tags:

python

I am trying to install mysqlclient for python, but I always get this error when I try:

$ pip3 install mysqlclient

error

How can I resolve this issue?

like image 258
Hasan Bilal Avatar asked Aug 10 '20 15:08

Hasan Bilal


1 Answers

Looking at the error message, it seems that there is an OS Error, and judging by the terminal layout, you're using Linux.

It seems that to install this package on Linux, there are extra instructions to follow, mentioned on the module's github page:

You may need to install the Python 3 and MySQL development headers and libraries like so:

  • $ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential # Debian / Ubuntu
  • % sudo yum install python3-devel mysql-devel # Red Hat / CentOS

Then you can install mysqlclient via pip now:

$ pip install mysqlclient

like image 104
marsnebulasoup Avatar answered Sep 19 '22 22:09

marsnebulasoup