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
相关推荐
十叶知秋2 分钟前
【jmeter】jmeter的线程组功能的详细介绍
数据库·jmeter·性能测试
龙哥说跨境6 分钟前
如何利用指纹浏览器爬虫绕过Cloudflare的防护?
服务器·网络·python·网络爬虫
Source.Liu7 分钟前
【用Rust写CAD】第二章 第四节 函数
开发语言·rust
monkey_meng7 分钟前
【Rust中的迭代器】
开发语言·后端·rust
余衫马10 分钟前
Rust-Trait 特征编程
开发语言·后端·rust
monkey_meng13 分钟前
【Rust中多线程同步机制】
开发语言·redis·后端·rust
Jacob程序员15 分钟前
java导出word文件(手绘)
java·开发语言·word
小白学大数据22 分钟前
正则表达式在Kotlin中的应用:提取图片链接
开发语言·python·selenium·正则表达式·kotlin
flashman91123 分钟前
python在word中插入图片
python·microsoft·自动化·word
VBA633724 分钟前
VBA之Word应用第三章第三节:打开文档,并将文档分配给变量
开发语言