为什么' pip安装mysqlclient'在Ubuntu 18.04 LTS中不工作

编程入门 行业动态 更新时间:2024-10-21 15:26:56
本文介绍了为什么' pip安装mysqlclient'在Ubuntu 18.04 LTS中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我刚刚在计算机上创建了一个虚拟环境(我在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中不工作

本文发布于:2023-07-04 11:05:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1023562.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   工作   pip   amp   mysqlclient

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!