Python 3.7, Failed building wheel for MySql-Python

前端 未结 11 1458
忘了有多久
忘了有多久 2020-12-14 08:53

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

相关标签:
11条回答
  • 2020-12-14 08:57

    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

    0 讨论(0)
  • 2020-12-14 09:00

    Try this first

    sudo apt-get install python3.7-dev
    

    Then

    pip install mysqlclient
    
    0 讨论(0)
  • 2020-12-14 09:03

    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..

    0 讨论(0)
  • 2020-12-14 09:06

    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
    
    0 讨论(0)
  • 2020-12-14 09:08

    Use Anaconda and execute conda install mysqlclient

    0 讨论(0)
  • 2020-12-14 09:11

    use this command : sudo apt-get install libssl-dev

    0 讨论(0)
提交回复
热议问题