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

这篇具有很好参考价值的文章主要介绍了解决报错:python setup.py egg_info did not run successfully。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

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

root@autodl-container-b8bc118052-eb86b211:~/autodl-fs# python -m pip install -e code
Looking in indexes: https://repo.huaweicloud.com/repository/pypi/simple
Obtaining 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 "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", 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://www.toymoban.com/news/detail-561224.html

到了这里,关于解决报错:python setup.py egg_info did not run successfully的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决pip安装pygame提示python setup.py egg_info did not run successfully.│ exit code: 1错误

    当使用命令【 pip install pygame 】进行安装时提示【 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─ [77 lines of output] 】报错信息如下图所示:

    2024年02月03日
    浏览(30)
  • python setup.py egg_info did not run successfully. Preparing metadata (pyproject.toml) did not run

    前提条件: 首先检查Python是否加入环境变量中。 以下是在Windows系统中将Python添加到环境变量中的步骤: 1.打开“控制面板”,然后单击“系统和安全”。 2.单击“系统”。 3.单击“高级系统设置”。 4.单击“环境变量”。 5.在“系统变量”下,找到名为“Path”的变量,并双

    2024年02月09日
    浏览(32)
  • Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-... 解决方法

    今天在虚拟机上配置Python的环境,安装pylint的时候报错: 一开始以为是pip不够新,于是更新了一下pip: 提示更新成功,但安装pylint依旧报同样的错。 仔细阅读黄字提示后发现:不应该使用sudo,去掉sudo后尝试安装: 果然就没有问题了。

    2024年02月12日
    浏览(35)
  • 解决Command “python setup.py egg_info“ failed with error code 1 in C:\Users\AppData\

    目录 解决Command \\\"python setup.py egg_info\\\" failed with error code 1 in C:UsersAppData 错误原因 解决方法 1. 确保安装了正确的依赖项 2. 更新pip和setuptools 3. 检查Python环境 4. 清理缓存 5. 手动安装依赖包 6. 检查错误信息 总结 在Python开发过程中,有时我们会遇到一些错误信息,其中之一是​

    2024年02月05日
    浏览(33)
  • 【问题记录】Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*

            在Linux中使用pip安装命令时出现报错:Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*         安装了不适合当前Python版本的pip,例如Python3.5安装了带有f-字符串(Python3.5后才支持的一种新的增强型字符串格式化方式)代码的pip         方法一:更新

    2024年02月16日
    浏览(34)
  • 已解决python setup.py bdist_wheel did not run successfully.

    已解决(pip安装第三方模块lxml模块报错)Building wheels for collected packages: lxml Building wheel for lxml (setup.py) … error error: subprocess-exited-with-error python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess,and is likely not a problem with pip. ERROR: Failed building wheel for lxml n

    2024年01月16日
    浏览(32)
  • python setup.py bdist_wheel did not run successfully

    安装webrtcvad时,报错python setup.py bdist_wheel did not run successfully 安装微软的VS Install,把你的操作系统包和改装的库装上 直接下载源码然后在源码目录

    2024年02月12日
    浏览(29)
  • python setup.py install 报错的解决

    可能是由于 Windows 的应用沙箱安全性限制导致的。在某些情况下,即使以管理员身份运行 PowerShell,也无法在受限的目录中创建或修改文件。 解决此问题的一种方法是选择一个不受限制的目录来安装 Python 包。你可以使用 --user 标志将包安装到用户目录而不是系统目录中。尝试

    2024年02月07日
    浏览(35)
  • 高效解决Anaconda Prompt报错Did not find VSINSTALLDIR这类问题

    类似于划红线部分然后还有很多行的报错信息,最后一行肯定是红色划线部分 找到 在这个文件夹内会有两个文件,删除 在Anaconda Prompt终端输入 conda uninstall vswhere 如果想获取更多神经网络深度学习强化学习资料可以私信我。之后我会持续更新,如果喜欢我的文章,请记得一键

    2024年02月12日
    浏览(25)
  • python setup.py install报错“error: can‘t create or remove files in install directory”

    问题描述: 在服务器上配置安装pip时候缺少setuptools,安装setuptools报错:   warnings.warn( error: can\\\'t create or remove files in install directory 有的朋友使用 即可解决。 但是,我使用了之后报错 右下角报错且让我打开帮助: Troubleshoot Visual Studio Code Integrated Terminal launch failures  这位腾腾任

    2024年02月06日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包