gpt4 book ai didi

python - 如何在 Digital Ocean 上安装 python 2.7 mysql

转载 作者:行者123 更新时间:2023-11-29 19:30:15 27 4
gpt4 key购买 nike

我尝试在 Digital Ocean 上的 Droplet 中使用此命令安装 mysql:

pip install MySQL-python

但它不起作用并显示此消息:

Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kjiS0F/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kjiS0F/MySQL-python/

最佳答案

可能是区域设置有问题。试试这个:

$ export LC_ALL=C

关于python - 如何在 Digital Ocean 上安装 python 2.7 mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41830323/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com