Skip to content

[Question]: 执行./build.bat -p "C:\Users\Administrator\AppData\Local\Programs\Python\Python313\python.exe"时,报Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ #607

@Only-Myth

Description

@Only-Myth

确认清单

  • 我已经搜索了现有的 Issues、Discussions 和文档
  • 我已经查阅了相关的用户手册和 API 文档
  • 这是一个使用问题,而不是 Bug 报告或功能请求

🎯 问题类型

🛠️ 安装和部署

🧩 相关组件

不确定/通用问题

👤 经验水平

🌱 新手 - 刚开始学习 RPA

❓ 具体问题

Collecting pyWinhook==1.6.2
Using cached pyWinhook-1.6.2.zip (15 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting pywin32 (from pyWinhook==1.6.2)
Using cached pywin32-311-cp313-cp313-win_amd64.whl.metadata (10 kB)
Using cached pywin32-311-cp313-cp313-win_amd64.whl (9.5 MB)
Building wheels for collected packages: pyWinhook
Building wheel for pyWinhook (pyproject.toml): started
Building wheel for pyWinhook (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

Building wheel for pyWinhook (pyproject.toml) did not run successfully.
exit code: 1

[27 lines of output]
C:\Users\Administrator\AppData\Local\Temp\pip-build-env-lvrlkhzr\overlay\Lib\site-packages\setuptools\dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

      ********************************************************************************
      Please consider removing the following classifiers in favor of a SPDX license expression:

      License :: OSI Approved :: MIT License

      See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
      ********************************************************************************

!!
self.finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-313\pyWinhook
copying pyWinhook\aa hook.py -> build\lib.win-amd64-cpython-313\pyWinhook
copying pyWinhook\doc.py -> build\lib.win-amd64-cpython-313\pyWinhook
copying pyWinhook\example.py -> build\lib.win-amd64-cpython-313\pyWinhook
copying pyWinhook\HookManager.py -> build\lib.win-amd64-cpython-313\pyWinhook
copying pyWinhook_init
.py -> build\lib.win-amd64-cpython-313\pyWinhook
running build_ext
building 'pyWinhook._cpyHook' extension
swigging pyWinhook/cpyHook.i to pyWinhook/cpyHook_wrap.c
swig.exe -python -o pyWinhook/cpyHook_wrap.c pyWinhook/cpyHook.i
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyWinhook
Failed to build pyWinhook
error: failed-wheel-build-for-install

Failed to build installable wheels for some pyproject.toml based projects

pyWinhook

🎯 使用场景

解决这个问题

🔍 尝试过的方法

No response

🖥️ 运行环境

Windows 11

📋 版本信息

No response

💻 相关代码

No response

⚙️ 配置文件

No response

📋 日志信息

No response

📸 截图或图片

No response

⏰ 紧急程度

🔷 中 - 希望尽快解决

💭 期望的帮助

No response

🤝 回馈意愿

  • 我愿意分享解决方案
  • 我可以帮助改进相关文档
  • 我愿意回答类似问题

📝 补充信息

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions