Kol*_*Ojo 0 python pip mysql-connector
使用缓存mysqlclient-2.0.3.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: /home/websiteuser/newenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/setup.py'"'"';
__file__='"'"'/tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/setup.py'"'"'
;f=getattr(tokenize, '"'"'open'"'"', open)
(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-q2ahr_b3
cwd: /tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-gtzius4s/mysqlclient_581cfbeeeb974b418354ec534fb82b74/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
Run Code Online (Sandbox Code Playgroud)
----------------------------------------
Run Code Online (Sandbox Code Playgroud)
警告:丢弃https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee 6239f7a5a9ae42396c2f1860f08a7c432(来自https://pypi.org/simple/mysqlclient/)(需要-python:>=3.5)。命令出错,退出状态为 1: python setup.py Egg_info 检查日志以获取完整的命令输出。错误:找不到满足 mysqlclient==2.0.3 要求的版本 错误:找不到 mysqlclient==2.0.3 的匹配发行版
我已经使用以下方法修复了它:
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
Run Code Online (Sandbox Code Playgroud)
然后:
pip install mysqlclient
Run Code Online (Sandbox Code Playgroud)
这是 Ubuntu 的编译问题。
| 归档时间: |
|
| 查看次数: |
2086 次 |
| 最近记录: |