53 Command “python setup.py egg_info“ failed with error

amber16编译安装 阅读详情

53.1 引言

今天在Ubuntu环境下搭建安信科技的ESP8266开发环境,到配置这一步骤时出现了,一个问题,网上一顿查阅,然后并没有实际解决,后面查到外文blog外国朋友遇到跟我一样的问题,参考他的做法才解决,特此记录,弥补中文博客对该问题解决方案的完整性不足问题。

53.2 问题

配置编译问题如下所示:

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ sudo pip install setuptools -U
The directory '/home/qihua/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/qihua/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/1e/5c/3d7b3d91a86d71faf5038c5d259ed36b5d05b7804648e2c43251d574a6e6/setuptools-58.2.0.tar.gz (2.3MB)
    100% |████████████████████████████████| 2.3MB 830kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1367
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-H1VVcQ/setuptools/
You are using pip version 8.1.1, however version 21.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

根据上述提示,是pip这个工具版本太低导致的,只要运行pip相关的命令就会出错。

sudo python -m pip install --user -r $IDF_PATH/requirements.txt
The directory '/home/qihua/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/qihua/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/qihua/esp/setuptools-19.2 (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 4))
Collecting click>=5.0 (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/21/83/308a74ca1104fe1e3197d31693a7a2db67c2d4e668f20f43a2fca491f9f7/click-8.0.1.tar.gz (327kB)
    100% |████████████████████████████████| 327kB 538kB/s 
    Complete output from command python setup.py egg_info:
    error in click setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in colorama; platform_system == 'Windows' at ; platform_system == 'Windows'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iqFjPF/click/
You are using pip version 8.1.1, however version 21.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

但是按照提示,执行升级更新指令:pip install --upgrade pip  后,并没啥用,没有更新到。

53.3 解决

经过一顿查阅,自动升级pip的命令(如下),没有成功,可能只是匹配当前环境用到的版本而已。

pip install --upgrade pip

然后用指定升级版本的方法,让pip升级到高版本就行了,命令如下:

pip install --upgrade pip==20.3

升级了pip之后,我顺便把setuptools工具也升级了。

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ python -m pip install --upgrade setuptools
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting setuptools
  Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 231 kB/s 
Installing collected packages: setuptools
Successfully installed setuptools-44.1.1
WARNING: You are using pip version 20.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

最后,问题解决了!!

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ sudo python -m pip install --user -r $IDF_PATH/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/home/qihua/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-19.2-py2.7.egg (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 4)) (19.2)
Collecting click>=5.0
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
     |████████████████████████████████| 82 kB 207 kB/s 
Requirement already satisfied: pyserial>=3.0 in /usr/lib/python2.7/dist-packages (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 9)) (3.0.1)
Collecting future>=0.15.2
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 363 kB/s 
Collecting cryptography>=2.1.4
  Downloading cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
     |████████████████████████████████| 2.6 MB 8.0 MB/s 
Collecting pyparsing<2.4.0,>=2.0.3
  Downloading pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 19.0 MB/s 
Collecting pyelftools>=0.22
  Downloading pyelftools-0.27-py2.py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 34.7 MB/s 
Collecting enum34; python_version < "3"
  Downloading enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting six>=1.4.1
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting ipaddress; python_version < "3"
  Downloading ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting cffi>=1.12
  Downloading cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)
     |████████████████████████████████| 389 kB 12.1 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 18.2 MB/s 
Building wheels for collected packages: future
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py2-none-any.whl size=504728 sha256=b1326b708e930fd621e0c6b869c09994de1f05597255e33694647dcdb71475df
  Stored in directory: /tmp/pip-ephem-wheel-cache-lty8At/wheels/5f/11/0c/aad680baf5ef4fbcbab992c9f03e1130357e0c173a4fdabfff
Successfully built future
Installing collected packages: click, future, enum34, six, ipaddress, pycparser, cffi, cryptography, pyparsing, pyelftools
  WARNING: The scripts futurize and pasteurize are installed in '/home/qihua/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed cffi-1.14.6 click-7.1.2 cryptography-3.3.2 enum34-1.1.10 future-0.18.2 ipaddress-1.0.23 pycparser-2.20 pyelftools-0.27 pyparsing-2.3.1 six-1.16.0
WARNING: You are using pip version 20.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

PyCon 2012:Python 3迁移与virtualenv普及的关键转折点 Python 3迁移并非始于2015年,而是由PyCon 2012这一技术分水岭正式锚定——它标志着生态从‘能用’迈向‘敢用’的质变。其核心原理在于基础设施协同演进:virtualenv的稳定普及解决了依赖隔离难题,PyPI包数量突破7000个构建了可规模化的协作基础,Django 1.4的时区支持则倒逼数据库与部署流程升级。这一系列变化共同降低了Python 3落地的工程成本,使迁移从理论共识转为生产必需。典型应用场景包括老旧Django系统的渐进式升级、共享主机环境下的无权限部署,以及PyPI包元数据合 阅读详情

相关推荐

python27离线安装cryptography库资源

python27离线安装cryptography库资源

安装软件时出现Command “python setup.py egg_info“ failed with error code 1 in /tmp的解决方案

安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp的解决方案

weixin_43997319的博客 4万+

Python库 | cryptography-3.3.1-cp27-cp27mu-manylinux1_x86_64.whl

资源分类:Python库 所属语言:Python 使用前提:需要解压 资源全名:cryptography-3.3.1-cp27-cp27mu-manylinux1_x86_64.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

Python 报错:Command "python setup.py egg_info" failed with error code 1

最近做一个项目,需要搭建很多不同的python环境,于是我就用pip install装了很多包,但是装包的时候我遇到了很多次这个报错,比如这一次我在安装imgaug的时候也提示了这个错误。 如图所示,红色部分提示Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1\AppData\Loca...

Eiffel的博客 4万+

MEG预处理-Brainstorm

Brainstorm下载和安装 去Brainstorm官网进行下载:打开网页后,点击左侧Download;在跳出来的界面中进行简单的注册,注册完成后可以进行下载 解压后得到“brainstorm3”的文件夹,里面包含Brainstorm工具包的所有文件,把这个文件夹放在某个路径如"E:\matlab_tools\brainstorm3"即可 同样在某个路径建立空的文件夹命名为:brainstorm_db用于工具包运行过程中自动存储生成的文件,所以这个文件中生成的数据不要手动移动删除 在Matlab中,把.

AxeChen的博客 6124

MATLABGUI读取文件并将路径显示在文本框中

MATLABGUI读取文件并将路径显示在文本框中

m0_50305149的博客 2650

python setup failed_Command "python setup.py egg_info" failed with error code

解决pip install MySQL-python 报Command "python setup.py egg_info" failed with error code 问题解决方法此方法 可能对你不可行,我也是尝试了网上N种方法才解决好的,至于是哪种方法解决的我也不清楚Collecting mysql-pythonUsing cached MySQL-python-1.2.5.zipComp...

weixin_39735005的博客 544

10分钟训练你的AI歌手:RVC WebUI声音克隆保姆级教程

本文提供了一份详细的RVC WebUI声音克隆保姆级教程,指导用户如何在10分钟内利用Retrieval-based-Voice-Conversion技术训练专属AI歌手。教程涵盖从环境配置、数据准备、模型训练到最终推理应用的全流程,即使是新手也能快速上手,实现高质量的声音克隆与歌曲生成。

weixin_29073241的博客 819

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sg4cklnw/psycopg2/

[root@localhost WeeklyReport]# docker build -t weeklyreport:0.2 . Sending build context to Docker daemon 48.49MB Step 1/16 : FROM centos:7 ---> 5e35e350aded Step 2/16 : MAINTAINER CodingCrush --...

Harvey903的博客 1460

保姆级教程:用Smaart7和你的USB声卡搞定现场音响系统调试(附频谱与延时测试避坑指南)

本文提供Smaart7与USB声卡协同工作的现场音响系统调试指南,涵盖硬件连接、频谱分析、延时校准等关键步骤。通过详细的操作流程和常见问题解决方案,帮助音响工程师快速掌握专业测量技术,确保演出音质达到最佳状态。

weixin_29290259的博客 422

小红书urlscheme和Activity

本文档详细介绍了小红书App的Deeplink跳转规范,涵盖了多个功能模块的跳转协议。主要内容包括:主页各Tab(关注、发现、购买)的跳转方式;不同类型笔记(图文/视频/长笔记)的详情页跳转参数;用户相关页面(主页/绑定/资料/消息等)的跳转协议;搜索功能(输入页/结果页)的跳转方式;以及话题、标签、专辑、H5页面等特殊场景的跳转实现。文档还提供了各跳转协议所需的参数说明,包括参数类型、默认值、是否必填等详细信息,并标注了不同版本和平台的兼容性要求。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 786

python2安装模块出现Command “python setup.py egg_info“ failed with error code 1 in报错

[root@jenkins-8f57b8495-4r8ws opt]# pip install gitpython==2.1.0 -i https://mirrors.aliyun.com/pypi/simple/ Collecting gitpython==2.1.0 Downloading https://mirrors.aliyun.com/pypi/packages/2c/21/1db408fefa1ebe694d69a2bf7bb5b9ab57a3f065154228086a4f64e4c33

weixin_45131349的博客 2354

基于YOLOv10深度学习的花生种子霉变检测系统

YOLO(You Only Look Once)是当前最先进的目标检测算法之一,具有快速、精准的特性。YOLOv10是YOLO系列的最新版本,相较于之前的版本,YOLOv10在特征提取、模型精度和速度上都有了显著的提升。YOLOv10采用了更深的卷积神经网络、更多的跨层特征融合方法,使得其在不同尺寸物体的检测和复杂场景的处理上都表现出了优异的性能。YOLOv10特别适合应用在需要快速处理并检测大量图像的任务中,如花生种子霉变检测等,能够实现精准、高效的检测。

2201_76125393的博客 648

pip安装软件时出现Command “python setup.py egg_info“ failed with error code 1 in /tmp的解决方案

解决后展示再次安装成功。

reg183的专栏 1640

杰理 JL701N/JL703N USB MIDI 使用教程

摘要:本教程介绍如何在杰理JL701N/JL703N音箱的可视化SDK中配置USB MIDI功能。主要步骤包括:1)启用PC模式;2)修改SDK宏定义启用USB MIDI;3)实现MIDI数据接收处理逻辑;4)调用接口发送MIDI数据;5)使用MIDI-OX测试功能。针对低版本SDK可能出现的设备识别问题,提供了在midi.c文件中添加特定代码行的解决方案。使用前需确保SDK版本达标,并注意备份原始文件。

qq_42014563的博客 1267

从 Service Entry Sheet 按 PO 行项目追溯服务行:PACKNO 与 ESLL 层级解包实战

摘要: SAP MM模块中,外部服务采购的数据结构较为复杂,服务明细并非直接存储在采购订单行项目表EKPO中,而是通过PACKNO关联到服务包表ESLL。本文解析了从采购订单行项目EBELN+EBELP获取服务行号SRVPOS的方法,重点分析了服务包的层级结构(根包、子包SUB_PACKNO),并提供了兼容合同项目的ABAP代码实现。通过EKPO-PACKNO定位根包后,需结合ESUC和ESLL表逐层解析子包,最终获取服务明细数据,解决了服务采购场景下的数据关联难题。(149字)

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 174

关于在虚拟环境中使用pip安装时,Command "python setup.py egg_info" failed with error code 1报错,解决办法之一

在虚拟环境中安装drf-haystack时,pip报错 Collecting drf-haystack   Downloading https://files.pythonhosted.org/packages/58/77/6be5100aaf2277157b4e3b4c7d9c4b570ddce82357974382bd1b92ccef16/drf_haystack-1.8.3-py2.py...

AntiZheng的博客 3822

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Using pbuilder and sbuild and debuild to build debian package (by quqi99)

问题 在ussuri (16.3.0)里有一个bug, 但在steain(15.3.4)里没有,需要二分,先通过’git tag’找到其中的16.0.0, 16.1.0, 16.3.0三个tag 15.3.4 16.0.0 https://launchpad.net/ubuntu/+source/neutron/2:16.0.0-0ubuntu2 16.0.0.0b1 16.0.0.0rc1 16.0.0.0rc2 16.1.0 https://launchpad.net/ubuntu/+source/ne

技术并艺术着 1779

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

错误 Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build*

安装Roboware Studio后,为了支持Python调试功能,需要先安装pylint 使用sudo python -m pip install pylint命令产生报错:Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-YIFBGL/pylint/ 图中可见: 一、安装pylint报错: Command "python setup.py egg_info" failed with error c

qq_43406338的博客 1万+

python pip 报错 Command “python setup.py egg_info“ failed with error code 1 解决方法

在执行 pip3 install scrapy 时遇到错误: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/lg/r29fx28n3rz9437dg3bff_9h0000gn/T/pip-install-z7_sesz1/Twisted/ 解决方法是更新 setuptools 和 pip: pip install --upgrade setuptools python

whatday的专栏 2万+

Python案例篇3-pip install 失败 Command “python setup.py egg_info“ failed with error code 1

一.问题描述 最近在自学pyspark,想本地通过pycharm来编辑pyspark脚本,运行的时候,提示没有pyspark模块,于是通过pycharm安装了pyspark(最新版本)。 而且这个安装到了远程服务器上,真的坑 奈何我安装的是CDH 6.3.1版本,然后spark版本是 2.4.0-cdh6.3.1,然后最新版本是3.0.2的 新的pyspak程序,都未记录到 History Server服务上。 于是首先通过pip卸载pyspark 3.0.2版本,然后安装pyspark 2.4.0版本

只是甲的博客 1万+

【问题记录】Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*

如何重装pip

m0_63898862的博客 9923

error in qpth setup command: ‘install_requires‘ must be a string or list of strings 解决方案

error in qpth setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier) numpy>=1

dream6985的博客 2490

在执行 pip install 时遇到错误: ERROR: Complete output from command python setup.py egg_info:

在执行 pip install 时遇到错误: ~]# pip install -U docker-compose ................. ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "<strin...

qq_41270538的博客 2万+

netconf学习-安装ncclient客户端提示'install_requires'错误

环境说明 (1)操作系统:centos7.7 (2)python版本:2.7.5 问题描述 在学习netconf的时候需要编写netconf自动化,此时就需要用到netconf客户端工具,需要进行安装,安装过程中出现安装失败问题,无法安装,尝试在python 3.x版本上安装可以安装成功,在windows上使用pip安装也可以正常安装,后来查找了一些其他博主的博客通过对setuptools工具进行...

xianyuesuifeng的博客 4868

真正解决出现pip安装软件时出现Command “python setup.py egg_info“ failed with error code 1 in /tmp/的办法

真正解决出现pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/的办法

m0_57949020的博客 1万+
上一篇: 52 单片机复位原因查找
下一篇: 54 ESP32Wifi模块之开启AP+STA共存及IP_NAPT模式
Chasing_Chasing
博客等级 码龄10年 233粉丝 87原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值