Error installing mysqlclient for python on Ubuntu 18.04

前端 未结 6 601
挽巷
挽巷 2020-12-01 14:57

I installed Python 2.7.15rci and Python 3.6.7 on Ubuntu. When i did \'pip list\' on virtualenv it returns me:

Django (2.1.5)
pip (9.0.1)
pkg-resources (0.0.0         


        
6条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 15:28

    This issue was persistent in Ubuntu and python 3+. In my case, I was using Ubuntu 18.04 and found this solution to be useful for python version 3.7.5

    Step 1. Install libpython3.7-dev via sudo apt

    > sudo apt-get install libpython3.7-dev
    

    Step 2: Install mysqlclient

    > python3 -m pip install mysqlclient==1.4.6
    

提交回复
热议问题