您的位置:首页 > 编程语言 > Python开发

报错:python setup.py egg_info Check the logs for full comm

2020-01-15 09:41 1646 查看

部署WPS云文档的时候,出现以下错误:

[code]DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: ./
Processing ./ansible-2.6.2.tar.gz
ERROR: Command errored out with exit status 1:
command: /bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-7hONH2/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-7hONH2/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-req-build-7hONH2/pip-egg-info
cwd: /tmp/pip-req-build-7hONH2/
Complete output (19 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-7hONH2/setup.py", line 312, in <module>
main()
File "/tmp/pip-req-build-7hONH2/setup.py", line 307, in main
setup(**setup_params)
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'check_specifier'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

去百度搜索了一下,说是Python2.7版本太老了,附上升级Python3以上版本的方式:

[code]1.安装前查看当前系统下的python版本号

# python -V

2.获取python3.x的官方软件包

# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

3.解压缩该软件包

# tar -zxvf Python-3.6.5.tgz

4.在解压目录下安装配置

# cd Python-3.6.5
# ./configure

5.编译并安装

# make
# make install

发现..还是不行,竟然还是提示我用的是Python2.7,那就是WPS那个安装程序的问题了..

继续寻找解决方式

最后官方给出了解决方法:

  • 点赞 1
  • 收藏
  • 分享
  • 文章举报
KurtX 发布了24 篇原创文章 · 获赞 40 · 访问量 11万+ 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐