当前位置: 代码迷 >> 综合 >> 安装PyMysql报错 python setup.py egg_info Check the logs for full command output.
  详细解决方案

安装PyMysql报错 python setup.py egg_info Check the logs for full command output.

热度:66   发布时间:2023-09-13 21:33:32.0

最快的方式就是把pip变成pip3

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

报错信息

Looking in indexes: http://pypi.douban.com/simple/
Collecting pymysql
Downloading http://pypi.doubanio.com/packages/2b/c4/3c3e7e598b1b490a2525068c22f397fda13f48623b7bd54fb209cd0ab774/PyMySQL-1.0.0.tar.gz (45 kB)
|████████████████████████████████| 45 kB 3.8 MB/s
ERROR: Command errored out with exit status 1:
command: /home/wyf/.virtualenvs/python2.7/bin/python -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-i04pFU/pymysql/setup.py’"’"’; file=’"’"’/tmp/pip-install-i04pFU/pymysql/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-ZuuABi
cwd: /tmp/pip-install-i04pFU/pymysql/
Complete output (5 lines):
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-i04pFU/pymysql/setup.py”, line 6, in
with open("./README.rst", encoding=“utf-8”) as f:
TypeError: ‘encoding’ is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

先下载安装包

  • https://pypi.doubanio.com/simple/pymysql/

安装PyMysql报错 python setup.py egg_info Check the logs for full command output.

解压

tar zxvf PyMySQL-0.10.1.tar.gz 
---解压后进入目录
cd PyMySQL-0.10.1/

     
  • 1
  • 2
  • 3

安装

python setup.py install

     
  • 1

安装PyMysql报错 python setup.py egg_info Check the logs for full command output.

  相关解决方案