吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 776|回复: 27
收起左侧

[求助] 求大佬救救孩子,Pyqt6安装失败

[复制链接]
ahehaoyu 发表于 2024-8-31 19:43
本帖最后由 ahehaoyu 于 2024-9-10 10:42 编辑

2024.09.10   真是mmp  安装python  64位就没这个问题了

萌新学习pyqt6,死在第一步  


问GPT也没问出个所以然来


Python版本3.7.0

Snipaste_2024-08-31_19-39-54.jpg
[Asm] 纯文本查看 复制代码
(base) C:\Users\Administrator\Desktop\pyqt>pip install PyQt6
Looking in indexes: [url=https://mirrors.aliyun.com/pypi/simple]https://mirrors.aliyun.com/pypi/simple[/url]
Collecting PyQt6
  Using cached [url=https://mirrors.aliyun.com/pypi/packages/8c/2b/6fe0409501798abc780a70cab48c39599742ab5a8168e682107eaab78fca/PyQt6-6.6.1.tar.gz]https://mirrors.aliyun.com/pypi/ ... /PyQt6-6.6.1.tar.gz[/url] (1.0 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
  ╰─> [31 lines of output]
      Querying qmake about your Qt installation...
      pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
      Traceback (most recent call last):
        File "d:\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "d:\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "d:\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-d5odxe2a\overlay\Lib\site-packages\sipbuild\api.py", line 47, in build_wheel
          arguments=_convert_config_settings(config_settings))
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-d5odxe2a\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-d5odxe2a\overlay\Lib\site-packages\sipbuild\project.py", line 603, in setup
          self.update(tool)
        File "project.py", line 165, in update
      sipbuild.exceptions.UserException
      Traceback (most recent call last):
        File "d:\anaconda3\lib\weakref.py", line 624, in _exitfunc
          f()
        File "d:\anaconda3\lib\weakref.py", line 548, in __call__
          return info.func(*info.args, **(info.kwargs or {}))
        File "d:\anaconda3\lib\tempfile.py", line 795, in _cleanup
          _shutil.rmtree(name)
        File "d:\anaconda3\lib\shutil.py", line 507, in rmtree
          return _rmtree_unsafe(path, onerror)
        File "d:\anaconda3\lib\shutil.py", line 395, in _rmtree_unsafe
          onerror(os.rmdir, path, sys.exc_info())
        File "d:\anaconda3\lib\shutil.py", line 393, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\Administrator\\AppData\\Local\\Temp\\tmpy4jiakmg'
      [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.

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

hrpzcf 发表于 2024-8-31 20:19
把Python 3.7删了,装3.8以上版本,建议3.9+
T4DNA 发表于 2024-8-31 20:35
1、以管理员模式打开试试
2、打开lib\site-packages\pip\compat\__init__.py,第75行把return s.decode(‘utf_8’)改为return s.decode(‘cp936’) 试试
 楼主| ahehaoyu 发表于 2024-8-31 20:45
T4DNA 发表于 2024-8-31 20:35
1、以管理员模式打开试试
2、打开lib\site-packages\pip\compat\__init__.py,第75行把return s.decode(‘ ...

我这里好像没有compat这个文件夹呢
似水流年2015 发表于 2024-8-31 20:46
PermissionError:   这报的是权限错误吧,卸载重新安装3.86,然后重启电脑再试试
 楼主| ahehaoyu 发表于 2024-8-31 20:47
似水流年2015 发表于 2024-8-31 20:46
PermissionError:   这报的是权限错误吧,卸载重新安装3.86,然后重启电脑再试试

我试了重装好几次 都不行

点评

是所有包都不能装还是只有PyQt5  详情 回复 发表于 2024-8-31 20:49
T4DNA 发表于 2024-8-31 20:49
ahehaoyu 发表于 2024-8-31 20:47
我试了重装好几次 都不行

是所有包都不能装还是只有PyQt5
 楼主| ahehaoyu 发表于 2024-8-31 20:54
T4DNA 发表于 2024-8-31 20:49
是所有包都不能装还是只有PyQt5

就pyqt6不能安装
xuyanhenry 发表于 2024-8-31 21:01
试试通过whl离线安装包安装呢
刘统宝 发表于 2024-8-31 21:20
实在不行就重新安装电脑系统,一个干干净净的系统很灵的,我就是这样做的
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-24 12:01

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表