mysql_config not found when installing mysqldb python interface

前端 未结 30 1487
暗喜
暗喜 2020-11-22 06:56

I am trying to get a Python script to run on the linux server I\'m connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to i

30条回答
  •  情话喂你
    2020-11-22 07:37

    I had the same problem. I solved it by following this tutorial to install Python with python3-dev on Ubuntu 16.04:

    sudo apt-get update
    sudo apt-get -y upgrade
    sudo apt-get install -y python3-pip
    sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
    

    And now you can set up your virtual environment:

    sudo apt-get install -y python3-venv
    pyvenv my_env
    source my_env/bin/activate
    

提交回复
热议问题