Upgraded to Ubuntu 16.04 now MySQL-python dependencies are broken

后端 未结 8 446
误落风尘
误落风尘 2021-01-01 10:26

I just upgraded my Ubuntu install to 16.04 and this seems to have broken my mysql dependencies in the MySQL-python package.

Here is my error message:



        
相关标签:
8条回答
  • 2021-01-01 10:30

    I ended up finding the solution to my problems with pip install --no-binary MySQL-python MySQL-python as stated in this thread : Python's MySQLdb can’t find libmysqlclient.dylib with Homebrewed MySQL

    0 讨论(0)
  • 2021-01-01 10:33

    Thank for Largaroth. If you use mysqlclient on Ubuntu 16.04 and have error: ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

    You can fix:

    sudo -H pip uninstall mysqlclient
    
    sudo -H pip install --no-binary mysqlclient mysqlclient
    
    0 讨论(0)
  • 2021-01-01 10:46

    I had the same issue. I uninstalled and reinstalled MySQL-python:

    pip uninstall MySQL-python
    pip install MySQL-python
    
    0 讨论(0)
  • 2021-01-01 10:51

    I had this issue with python 3.6... when I used an environment with Python 3.5 it worked just fine.

    0 讨论(0)
  • 2021-01-01 10:54

    I solved this on my virtual environment using django 2.2.7 and Ubuntu 19.10 by doing:

    pip3 uninstall mysqlclient

    pip3 install mysqlclient

    0 讨论(0)
  • 2021-01-01 10:55

    I had this issue on updating to stretch. To fix it I updated my requirements.txt:

    mysqlclient==1.4.2.post1

    So either update that manually or pip install --upgrade mysqlclient

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