首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用pip安装pytq5时出错:准备元数据(pyproject.toml)未成功运行

使用pip安装pytq5时出错:准备元数据(pyproject.toml)未成功运行
EN

Stack Overflow用户
提问于 2022-02-02 19:46:16
回答 9查看 78.8K关注 0票数 24

我尝试用pip安装pytq5并得到这个错误

代码语言:javascript
运行
复制
$ python3 -m pip install PyQt5
Collecting PyQt5
  Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        ...
        ...
        ...
      [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.

我仍然可以安装其他软件包,如lxml,但不能安装pytq5。我正在虚拟环境中安装所有的东西。

有什么主意吗?

EN

Stack Overflow用户

发布于 2022-04-19 20:25:45

好的,我在python中遇到了这个问题,在搜索之后,我找到了两个解决这个问题的方法,因为这个问题不仅存在于3.10.4中,还存在于其他库中。

#注:如果您有上述问题,这些解决方案可供下载任何库,而我在windows中遇到了这些问题。

所以你可以试试这个方法:

代码语言:javascript
运行
复制
pip install turtle==0.0.1

0.0.1 --这是库的最后一个版本,因此您应该找到要为此目的安装的库的版本,可以使用以下命令找到库的版本:

代码语言:javascript
运行
复制
pip show module <name_of_the_library>

另一个可行的解决方案是使用--use-deprecated=backtrack-on-build-failures

示例:

代码语言:javascript
运行
复制
pip install turtle --use-deprecated=backtrack-on-build-failures

希望能帮助你。

票数 5
EN
查看全部 9 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70961915

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档