我在 Django 框架中使用 python3.8,为此我必须安装 mysqlclient。但是当我尝试时错误来了
pip3 install mysqlclient
Run Code Online (Sandbox Code Playgroud)
像这样输出为错误。
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/LPython/my_env/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fgg27tgk/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fgg27tgk/mysqlclient/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-install-fgg27tgk/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-fgg27tgk/mysqlclient/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/LPython/my_env/lib/python3.8/site-packages/setuptools/__init__.py", line 20, in <module>
from setuptools.dist import Distribution, Feature
File "/home/LPython/my_env/lib/python3.8/site-packages/setuptools/dist.py", line 35, in <module>
from setuptools import windows_support
File …Run Code Online (Sandbox Code Playgroud)