问题描述
我在 Ubuntu 上安装了 Python 2.7.15rci 和 Python 3.6.7.当我在 virtualenv 上执行pip list"时,它返回给我:
I installed Python 2.7.15rci and Python 3.6.7 on Ubuntu. When i did 'pip list' on virtualenv it returns me:
我正在尝试安装 mysqlclient (pip install mysqlclient) 并返回错误.
I'm trying to install mysqlclient (pip install mysqlclient) and returns an error.
所以,我尝试了不同的方法,例如:
So, I have tried different methods found like:
还有一些……但它们都不适合我,问题仍然存在.有什么建议吗?
and some more... but none of them work for me and the problem persists. Any suggestions?
谢谢!
推荐答案
gcc
是 build-essential
包的一部分,您应该先安装它:
gcc
is part of the build-essential
package, which you should install before anything else:
更新:按照@bosnjak 的建议,您可能还需要安装 openssl 开发人员工具:
UPDATE: Following @bosnjak's suggestion, you also might need to install the openssl developer tools:
这篇关于在 Ubuntu 18.04 上为 python 安装 mysqlclient 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!