请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

uv安装Openai失败

(myenv) (ai-agent-demo2) C:\Users\Administrator\Desktop\工作学习\智能体\ai-agent-demo2>uv add oppai
Resolved 29 packages in 17ms
x Failed to build oppai==4.1.0
|-> The build backend returned an error
-> Call tosetuptools.build_meta:legacy.build_wheel` failed (exit code: 1)

  [stdout]
  running bdist_wheel
  running build
  running build_py
  copying oppai.py -> build\lib.win-amd64-cpython-312
  running build_ext
  building '_oppai' extension

  [stderr]
  'swig' �����ڲ����ⲿ���Ҳ���ǿ����еij���
  �����������
  C:\Users\Administrator\AppData\Local\uv\cache\builds-v0\.tmpQ2VVck\Lib\site-packages\setuptools\dist.py:599: SetuptoolsDeprecationWarning: Invalid dash-separated key 'swig-opts' in 'build_ext'
  (setup.cfg), please use the underscore name 'swig_opts' instead.
  !!

          ********************************************************************************
          Usage of dash-separated 'swig-opts' will not be supported in future
          versions. Please use the underscore name 'swig_opts' instead.
          (Affected: oppai).

          By 2026-Mar-03, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************

  !!
    opt = self._enforce_underscore(opt, section)
  C:\Users\Administrator\AppData\Local\uv\cache\builds-v0\.tmpQ2VVck\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
  !!

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

          License :: Public Domain

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

  !!
    self._finalize_license_expression()
  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/

  hint: This usually indicates a problem with the package or the build environment.

help: If you want to add the package regardless of the failed resolution, provide the --frozen flag to skip locking and syncing.

UV 安装OpenAI报错,安装失败

正在回答 回答被采纳积分+3

问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号