文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

解决报错:python setup.py egg_info did not run successfully

2023-09-11 22:07

关注

记录一下安装detectron2过程的解决debug经验,报错如下,主要是python setup.py egg_info did not run successfully:

root@autodl-container-b8bc118052-eb86b211:~/autodl-fs# python -m pip install -e codeLooking in indexes: https://repo.huaweicloud.com/repository/pypi/simpleObtaining file:///root/autodl-fs/code  Preparing metadata (setup.py) ... error  error: subprocess-exited-with-error    × python setup.py egg_info did not run successfully.  │ exit code: 1  ╰─> [59 lines of output]      /root/miniconda3/lib/python3.9/site-packages/setuptools/dist.py:520: SetuptoolsDeprecationWarning: Invalid version: 'RegionCLIP'.      !!                    ********************************************************************************              The version specified is not a valid version according to PEP 440.              This may not work as expected with newer versions of              setuptools, pip, and PyPI.                    By 2023-Sep-26, you need to update your project and remove deprecated calls              or your builds will no longer be supported.                    See https://peps.python.org/pep-0440/ for details.              ********************************************************************************            !!        self._validate_version(self.metadata.version)      running egg_info      /root/miniconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py:131: SetuptoolsDeprecationWarning: Invalid version: 'RegionCLIP'.      !!                    ********************************************************************************              Version 'RegionCLIP' is not valid according to PEP 440.                    Please make sure to specify a valid version for your package.              Also note that future releases of setuptools may halt the build process              if an invalid version is given.                    By 2023-Sep-26, you need to update your project and remove deprecated calls              or your builds will no longer be supported.                    See https://peps.python.org/pep-0440/ for details.              ********************************************************************************            !!        return _normalization.best_effort_version(tagged)      Traceback (most recent call last):        File "", line 2, in <module>        File "", line 34, in <module>        File "/root/autodl-fs/code/setup.py", line 193, in <module>          setup(        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup          return distutils.core.setup(**attrs)        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup          return run_commands(dist)        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands          dist.run_commands()        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands          self.run_command(cmd)        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1244, in run_command          super().run_command(command)        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command          cmd_obj.ensure_finalized()        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized          self.finalize_options()        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options          parsed_version = packaging.version.Version(self.egg_version)        File "/root/miniconda3/lib/python3.9/site-packages/setuptools/_vendor/packaging/version.py", line 197, in __init__          raise InvalidVersion(f"Invalid version: '{version}'")      setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'RegionCLIP'      [end of output]    note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note: This is an issue with the package mentioned above, not pip.hint: See above for details.

网上试了很多方法

最后通过下面的方法解决的

pip install --upgrade pip setuptools==57.5.0

然后安装对应的步骤就可以了

来源地址:https://blog.csdn.net/QH2107/article/details/130983995

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯