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
相关推荐
wenxin-1 分钟前
NS3网络模拟器中如何利用Gnuplot工具像MATLAB一样绘制各类图形?
开发语言·matlab·画图·ns3·lr-wpan
Yeats_Liao2 分钟前
Navicat 导出表结构后运行查询失败ERROR 1064 (42000): You have an error in your SQL syntax;
数据库·sql
明月看潮生1 小时前
青少年编程与数学 02-007 PostgreSQL数据库应用 15课题、备份与还原
数据库·青少年编程·postgresql·编程与数学
明月看潮生1 小时前
青少年编程与数学 02-007 PostgreSQL数据库应用 14课题、触发器的编写
数据库·青少年编程·postgresql·编程与数学
数据小爬虫@2 小时前
深入解析:使用 Python 爬虫获取苏宁商品详情
开发语言·爬虫·python
健胃消食片片片片2 小时前
Python爬虫技术:高效数据收集与深度挖掘
开发语言·爬虫·python
王老师青少年编程3 小时前
gesp(C++五级)(14)洛谷:B4071:[GESP202412 五级] 武器强化
开发语言·c++·算法·gesp·csp·信奥赛
一只小bit4 小时前
C++之初识模版
开发语言·c++
王磊鑫5 小时前
C语言小项目——通讯录
c语言·开发语言
钢铁男儿5 小时前
C# 委托和事件(事件)
开发语言·c#