我刚刚在计算机上创建了一个虚拟环境(我在ubuntu 18.04 LTS上运行)。我有3.6.7的python版本,现在我想将mysqlclient安装到我的虚拟环境中。
I have just created a virtual environment on my machine (I am running on ubuntu 18.04 LTS). I have the python version of 3.6.7 and now I want to install mysqlclient into my virtual environment.
在执行 pip之后,安装mysqlclient
After I do pip install mysqlclient it didn't work, instead it gave me errors saying;
命令 python.py egg_info在/ tmp / pip-install-zd21vfb3 / mysqlclient /中失败,错误代码为1,并且找不到msql_config文件。
Command "python.py egg_info" failed with error code 1 in /tmp/pip-install-zd21vfb3/mysqlclient/', and that the msql_config file is not found.
我的设置工具都是最新的。
My setup tools are all up to date.
推荐答案mysqlclient 依赖于mysql客户端&正在安装dev软件包。为了在ubuntu上解决此问题,您必须使用 apt-get 安装几个mysql软件包。
mysqlclient has a dependency on the mysql client & dev packages being installed. In order to fix this on ubuntu, you have to use apt-get to install a couple of mysql packages.
在您的情况下,您的系统上似乎缺少了 mysql_config 。您可以通过在ubuntu仿生上安装 libmysqlclient-dev 来解决此问题。
In your case, it looks like the missing mysql_config might be missing on your system. You can fix that by installing libmysqlclient-dev on ubuntu bionic.
更多推荐
为什么' pip安装mysqlclient'在Ubuntu 18.04 LTS中不工作
发布评论