python3.12安装pyqt6-tools失败

bash 复制代码
Collecting pyqt6-tools
  Using cached pyqt6_tools-6.4.2.3.3-py3-none-any.whl.metadata (8.3 kB)
Requirement already satisfied: click in d:\software\coding\anaconda3\lib\site-packages (from pyqt6-tools) (8.1.7)
Collecting pyqt6==6.4.2 (from pyqt6-tools)
  Using cached PyQt6-6.4.2-cp37-abi3-win_amd64.whl.metadata (2.2 kB)
INFO: pip is looking at multiple versions of pyqt6-tools to determine which version is compatible with other requirements. This could take a while.
Collecting pyqt6-tools
  Using cached pyqt6_tools-6.3.1.3.3-py3-none-any.whl.metadata (8.3 kB)
Collecting pyqt6==6.3.1 (from pyqt6-tools)
  Using cached PyQt6-6.3.1-cp37-abi3-win_amd64.whl.metadata (2.2 kB)
Collecting pyqt6-tools
  Using cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl.metadata (8.3 kB)
Collecting pyqt6==6.1.0 (from pyqt6-tools)
  Using cached PyQt6-6.1.0.tar.gz (946 kB)
  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
  ╰─> [62 lines of output]
      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
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "D:\Software\Coding\Anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "D:\Software\Coding\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:\Software\Coding\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-ezn9pg22\overlay\Lib\site-packages\sipbuild\api.py", line 28, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-ezn9pg22\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 74, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-ezn9pg22\overlay\Lib\site-packages\sipbuild\project.py", line 624, in setup
          self.update(tool)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-install-e5enemau\pyqt6_4b69e4c1632342aaa60191f434a0a3b3\project.py", line 157, in update
          raise UserException(
      sipbuild.exceptions.UserException
      Traceback (most recent call last):
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 637, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpdc95gmm4'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "D:\Software\Coding\Anaconda3\Lib\tempfile.py", line 905, in onexc
          _os.unlink(path)
      PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpdc95gmm4'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "D:\Software\Coding\Anaconda3\Lib\weakref.py", line 666, in _exitfunc
          f()
        File "D:\Software\Coding\Anaconda3\Lib\weakref.py", line 590, in __call__
          return info.func(*info.args, **(info.kwargs or {}))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\Software\Coding\Anaconda3\Lib\tempfile.py", line 935, in _cleanup
          cls._rmtree(name, ignore_errors=ignore_errors)
        File "D:\Software\Coding\Anaconda3\Lib\tempfile.py", line 930, in _rmtree
          _shutil.rmtree(name, onexc=onexc)
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 781, in rmtree
          return _rmtree_unsafe(path, onexc)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 639, in _rmtree_unsafe
          onexc(os.rmdir, path, err)
        File "D:\Software\Coding\Anaconda3\Lib\tempfile.py", line 920, in onexc
          cls._rmtree(path, ignore_errors=ignore_errors,
        File "D:\Software\Coding\Anaconda3\Lib\tempfile.py", line 930, in _rmtree
          _shutil.rmtree(name, onexc=onexc)
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 781, in rmtree
          return _rmtree_unsafe(path, onexc)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 639, in _rmtree_unsafe
          onexc(os.rmdir, path, err)
        File "D:\Software\Coding\Anaconda3\Lib\shutil.py", line 637, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpdc95gmm4'
      [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.

查看官网看到该插件pyqt6-plugins · PyPI目前只支持到python3.11,故重新建立python3.11虚拟环境即可。

在conda命令行运行如下代码。

bash 复制代码
conda create -n pyqt python==3.11.9
conda activate pyqt
pip install pyqt6
pip install pyqt6-tools
相关推荐
没书读了6 分钟前
ssm框架-spring-spring声明式事务
java·数据库·spring
----云烟----8 分钟前
QT中QString类的各种使用
开发语言·qt
lsx20240612 分钟前
SQL SELECT 语句:基础与进阶应用
开发语言
小二·14 分钟前
java基础面试题笔记(基础篇)
java·笔记·python
开心工作室_kaic37 分钟前
ssm161基于web的资源共享平台的共享与开发+jsp(论文+源码)_kaic
java·开发语言·前端
向宇it38 分钟前
【unity小技巧】unity 什么是反射?反射的作用?反射的使用场景?反射的缺点?常用的反射操作?反射常见示例
开发语言·游戏·unity·c#·游戏引擎
i道i38 分钟前
MySQL win安装 和 pymysql使用示例
数据库·mysql
小怪兽ysl38 分钟前
【PostgreSQL使用pg_filedump工具解析数据文件以恢复数据】
数据库·postgresql
武子康43 分钟前
Java-06 深入浅出 MyBatis - 一对一模型 SqlMapConfig 与 Mapper 详细讲解测试
java·开发语言·数据仓库·sql·mybatis·springboot·springcloud
wqq_9922502771 小时前
springboot基于微信小程序的食堂预约点餐系统
数据库·微信小程序·小程序