我正在尝试安装Python包,但每次我都会遇到错误。我在不同的网页上寻找解决方案,但没有一个解决了我的问题。我不知道我是不是做错了什么,或者问题出在别的地方。
$ sudo pip install MySQL-python
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip (108 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kmndmtdh/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kmndmtdh/MySQL-python/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-kmndmtdh/MySQL-python/pip-egg-info
cwd: /tmp/pip-install-kmndmtdh/MySQL-python/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-kmndmtdh/MySQL-python/setup.py", line 13, in
from setup_posix import get_config
File "/tmp/pip-install-kmndmtdh/MySQL-python/setup_posix.py", line 2, in
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.错误信息:


发布于 2021-12-13 16:32:18
您可以尝试使用以下步骤安装"mysql-python",
https://askubuntu.com/questions/1380754
复制相似问题