(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报错,安装失败