首页 > 解决方案 > 下载 numpy、aitextgen 和其他模块的问题

问题描述

下载numpy的时候最后遇到了失败,

ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'c:\\python310\\Scripts\\f2py.exe' -> 'c:\\python310\\Scripts\\f2py.exe.deleteme'

并且在安装 aitextgen 时收到此错误:错误:无法安装 aitextgen==0.3.0,aitextgen==0.4.0,aitextgen==0.4.1,aitextgen==0.5.0,aitextgen==0.5.1 和 aitextgen= =0.5.2 因为这些包版本有冲突的依赖关系。`

冲突是由以下原因引起的:

aitextgen 0.5.2 depends on torch>=1.6.0
aitextgen 0.5.1 depends on torch>=1.6.0
aitextgen 0.5.0 depends on torch>=1.6.0
aitextgen 0.4.1 depends on torch>=1.6.0
aitextgen 0.3.0 depends on torch>=1.6.0

不知道是什么原因造成的。我已经使用巧克力重新安装了 Python。是否是涉及安装路径的问题?非常感谢任何帮助。我使用pip3 install [module] method.

标签: pythonmodulepip

解决方案


如果我正确判断您的 python 路径:

c:\\python310\\

然后你安装了 python 3.10。这在这一点上只是一个测试版,甚至还没有正式发布。

aitextgen 0.5.2 depends on torch>=1.6.0

这里的问题是pypitorch上只有 whl 文件可用,并且只有 python 3.9。你会经常遇到这个问题,因为它可能需要一些时间,可能在 10 月发布之后才能获得对许多 python 模块的官方支持。

您的选择:

  1. 安装较早版本的 python - 这可能是您的最佳选择。您可能不依赖任何特定的 python 3.10 功能
  2. 从源代码下载和编译torch- 这会很棘手,尤其是在 Windows 上,而且也不保证能正常工作。目前,torch 还没有对 python 3.10 的官方支持。在使用 pyhon 3.10 时,您可能还必须为其他模块解决类似的问题

推荐阅读