【发布时间】:2022-01-04 03:42:54
【问题描述】:
我有一个使用模块 mysqldb 的 python 代码,我搜索了很多,看起来该模块不再适用于 python3,我尝试了很多解决方案直到我达到这一点,每当我使用 pip3 install mysqlclient 时,我都会得到这个错误:
Collecting mysqlclient
Using cached mysqlclient-2.1.0.tar.gz (87 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dhu9r_pj/mysqlclient_0e2dcd019f494a5a9aba92fe372a86ec/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dhu9r_pj/mysqlclient_0e2dcd019f494a5a9aba92fe372a86ec/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-613c27qp
cwd: /tmp/pip-install-dhu9r_pj/mysqlclient_0e2dcd019f494a5a9aba92fe372a86ec/
【问题讨论】:
-
请将您的输出作为文本发布。 Stack Overflow 不接受文本截图。
-
pastebin 不是图像它是一个文本站点
-
pastepin 链接已添加
标签: python mysql module mysql-python