4

Problem

I am attempting to install mysqlclient via:

$ pip install mysqlclient

I receive the following error:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-_kwgf7vk/mysqlclient/

Background

Python version: 3.6.6

OS: Ubuntu 18.04.1 LTS

Virtualenv: I receive the same error both inside and outside of my virtual environment

Question

How can I successfully install mysql?

1
  • try to install mariadb-server before this and then try Commented Nov 15, 2018 at 10:10

3 Answers 3

6

I saw a similar post somewhere else. The solution was:

sudo apt-get install python3.6-dev libmysqlclient-dev

activate the virtual environment and execute command

pip install mysqlclient

I don't know if it's gonna help but i hope it will.

Sign up to request clarification or add additional context in comments.

Comments

5

As the official PyPi documentation suggests you need to have the following dependent libraries preinstalled

sudo apt-get install python-dev default-libmysqlclient-dev python3-dev

after that you could do a pip install mysqlclient

Comments

0

for linux mint : python3.7

$ sudo apt-get install python3.7-dev libmysqlclient-dev

$ sudo apt-get install libssl-dev

and then

$ pip install mysqlclient

https://github.com/openai/gym/issues/757

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.