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
相关推荐
litGrey5 分钟前
Maven国内镜像(四种)
java·数据库·maven
学步_技术13 分钟前
Python编码系列—Python组合模式:构建灵活的对象组合
开发语言·python·组合模式
ac-er888827 分钟前
在Flask中处理后台任务
后端·python·flask
ac-er888833 分钟前
Flask中的钩子函数
后端·python·flask
o独酌o37 分钟前
递归的‘浅’理解
java·开发语言
Book_熬夜!40 分钟前
Python基础(六)——PyEcharts数据可视化初级版
开发语言·python·信息可视化·echarts·数据可视化
我的运维人生1 小时前
利用Python与Ansible实现高效网络配置管理
网络·python·ansible·运维开发·技术共享
毕设木哥1 小时前
计算机专业毕业设计推荐-基于python的汽车汽修保养服务平台
大数据·python·计算机·django·汽车·毕业设计·课程设计
waterHBO1 小时前
R语言 基础笔记
开发语言·笔记·r语言
m0_631270401 小时前
高级c语言(五)
c语言·开发语言