NagaAgent
NagaAgent copied to clipboard
依赖numpy版本问题
我在windows上使用uv sync安装依赖时遇到了以下问题
第一次执行uv sync
Using CPython 3.13.2
Creating virtual environment at: .venv
x No solution found when resolving dependencies for split (python_full_version == '3.9.*'):
`-> Because the requested Python version (>=3.8) does not satisfy Python>=3.10 and mcp>=1.6.0 depends on
Python>=3.10, we can conclude that mcp>=1.6.0 cannot be used.
And because only the following versions of mcp are available:
mcp<=1.6.0
mcp==1.7.0
mcp==1.7.1
mcp==1.8.0
mcp==1.8.1
mcp==1.9.0
mcp==1.9.1
mcp==1.9.2
mcp==1.9.3
mcp==1.9.4
mcp==1.10.0
mcp==1.10.1
mcp==1.11.0
mcp==1.12.0
we can conclude that mcp>=1.6.0 cannot be used.
And because your project depends on mcp>=1.6.0 and your project requires nagaagent[audio], we can conclude that
your project's requirements are unsatisfiable.
hint: The `requires-python` value (>=3.8) includes Python versions that are not supported by your dependencies
(e.g., mcp>=1.6.0 only supports >=3.10). Consider using a more restrictive `requires-python` value (like
>=3.10).
hint: While the active Python version is 3.13, the resolution failed for other Python versions supported by your
project. Consider limiting your project's supported Python versions using `requires-python`.
在 pyproject.toml 里把requires-python = ">=3.8"改为requires-python = ">=3.10"
继续执行uv sync
C:\Users\Administrator\Desktop\NagaAgent-main>uv sync
Resolved 166 packages in 810ms
Built nagaagent @ file:///C:/Users/Administrator/Desktop/NagaAgent-main
Built srt==3.5.3
x Failed to build `numpy==1.26.4`
|-> The build backend returned an error
`-> Call to `mesonpy.build_wheel` failed (exit code: 1)
[stdout]
+ C:\Users\Administrator\AppData\Local\uv\cache\builds-v0\.tmpn1JUm9\Scripts\python.exe
C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src\vendored-meson\meson\meson.py
setup C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src
C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src\.mesonpy-sybxb19b
-Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md
--native-file=C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src\.mesonpy-sybxb19b\meson-python-native-file.ini
The Meson build system
Version: 1.2.99
Source dir: C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src
Build dir:
C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src\.mesonpy-sybxb19b
Build type: native build
Project name: NumPy
Project version: 1.26.4
WARNING: Failed to activate VS environment: Could not parse vswhere.exe output
..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'],
['pgcc']]
The following exception(s) were encountered:
Running `icl ""` gave "[WinError 2] 系统找不到指定的文件。"
Running `cl /?` gave "[WinError 2] 系统找不到指定的文件。"
Running `cc --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `gcc --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `clang --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `clang-cl /?` gave "[WinError 2] 系统找不到指定的文件。"
Running `pgcc --version` gave "[WinError 2] 系统找不到指定的文件。"
A full log can be found at
C:\Users\Administrator\AppData\Local\uv\cache\sdists-v9\pypi\numpy\1.26.4\y7d9APT_qemVOmGeWF6q1\src\.mesonpy-sybxb19b\meson-logs\meson-log.txt
hint: This usually indicates a problem with the package or the build environment.
help: `numpy` (v1.26.4) was included because `nagaagent` (v2.1.0) depends on `numpy`
又仔细看了下 pyproject.toml
发现其中"numpy>=1.24.0,<2.0.0",
项目对numpy的版本要求必须是低于2.0.0吗?
但是numpy 1.26.4 官方 wheel 目前只提供到 Python 3.11(3.12 需要 1.26.4 以上或 2.x 版本)。
于是uv就不得不从源码编译
但又缺少相关依赖,于是报错
并且编译本身也比较不方便
希望可以改进
哇,才发现。
是之前提供贡献的提供的版本修改,我这边没细看合并导致的