pip找不到Python的版本

编程语言 2026-07-09

我正在尝试构建 https://github.com/visualbruno/CuMesh 并把它添加到我的虚拟环境(venv)中,但pip似乎无法识别它使用的Python版本。所有这些命令都是在虚拟环境中执行的。

python --version
> Python 3.13.7

python -m pip --version
> pip 26.1.1 from /(path to my venv)/lib/python3.13/site-packages/pip (python 3.13)

python -m pip install CuMesh --no-build-isolation
> Collecting CuMesh
>   Using cached cumesh-0.1.0-py3-none-any.whl.metadata (268 bytes)
> INFO: pip is looking at multiple versions of cumesh to determine which version is compatible with other requirements. This could take a while.
> ERROR: Could not find a version that satisfies the requirement python>=3.8 (from cumesh) (from versions: none)
> ERROR: No matching distribution found for python>=3.8

我现在对接下来该怎么尝试都一头雾水。看起来pip的版本似乎表明它知道正在运行Python 3.13,但在那个依赖检查上失败。

解决方案

你需要让 pip 从当前目录 (.) 安装,也就是你克隆仓库的那个位置,而不是去PyPI上搜索名为“CuMesh”的包。

  1. 打开终端并 cd 进入你克隆的 CuMesh 仓库文件夹。
  2. 将安装指向当前目录进行安装:
python -m pip install . --no-build-isolation
站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。

相关文章