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
相关推荐
古希腊掌管学习的神1 小时前
[搜广推]王树森推荐系统——矩阵补充&最近邻查找
python·算法·机器学习·矩阵
半盏茶香1 小时前
在21世纪的我用C语言探寻世界本质 ——编译和链接(编译环境和运行环境)
c语言·开发语言·c++·算法
Evand J2 小时前
LOS/NLOS环境建模与三维TOA定位,MATLAB仿真程序,可自定义锚点数量和轨迹点长度
开发语言·matlab
LucianaiB2 小时前
探索CSDN博客数据:使用Python爬虫技术
开发语言·爬虫·python
Ronin3052 小时前
11.vector的介绍及模拟实现
开发语言·c++
计算机学长大白3 小时前
C中设计不允许继承的类的实现方法是什么?
c语言·开发语言
PieroPc4 小时前
Python 写的 智慧记 进销存 辅助 程序 导入导出 excel 可打印
开发语言·python·excel
云和数据.ChenGuang5 小时前
Django 应用安装脚本 – 如何将应用添加到 INSTALLED_APPS 设置中 原创
数据库·django·sqlite
woshilys6 小时前
sql server 查询对象的修改时间
运维·数据库·sqlserver
Hacker_LaoYi6 小时前
SQL注入的那些面试题总结
数据库·sql