Python2.7安装包错误解决

Python2.7安装包错误解决

1.环境

  • CentOS 7
  • Python 2.7.5
  • pip 20.3.4

2.错误描述

在安装库时出现报错Command "python setup.py egg_info" failed with error code 1,如下图所示。

原因:setuptools版本太低导致。

3.解决方法

安装高版本的setuptools,命令如下。

# 下载
wget https://files.pythonhosted.org/packages/24/49/7f567b628e14ee004938eec256cffeae7097db9e28576911ae7b84d2ff07/setuptools-41.1.0.post1.tar.gz
# 解压
tar -zxvf setuptools-41.1.0.post1.tar.gz
# 安装
cd setuptools-41.1.0.post1/
python setup.py install

参考博客: https://blog.csdn.net/Happy_Sunshine_Boy/article/details/99619966

​ https://blog.csdn.net/Chasing_Chasing/article/details/120657735

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2023年8月17日
下一篇 2023年8月17日

相关推荐