This error originates from a subprocess, and is likely not a problem with pip.问题解决记录


核心导读:
1.遇到报错先看报错写的啥,不要盲目百度
2.python版本不符


为什么会遇到这个问题

复现RMT网络框架的时候,用到了原作者的代码,其中需要用到timm这个库,下载的时候就出现了这个问题


分析报错原因

首先我们不能盲目去百度,搜索,要先看看报错是什么,再来判断问题类型,以下是我的报错。

  error: subprocess-exited-with-error

  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [4 lines of output]
      Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
      ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.9; 0.1.1 Requires-Python >=3.9; 0.1.2 Requires-Python >=3.9; 0.1.3 Requires-Python >=3.9; 0.1.4 Requires-Python >=3.9; 0.1.5 Requires-Python >=3.9; 0.1.6 Requires-Python >=3.9; 0.1.7 Requires-Python >=3.9; 0.1.8 Requires-Python >=3.9
      ERROR: Could not find a version that satisfies the requirement puccinialin (from versions: none)
      ERROR: No matching distribution found for puccinialin
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

我觉得主要问题应该在这里:

ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.9; 0.1.1 Requires-Python >=3.9; 0.1.2 Requires-Python >=3.9; 0.1.3 Requires-Python >=3.9; 0.1.4 Requires-Python >=3.9; 0.1.5 Requires-Python >=3.9; 0.1.6 Requires-Python >=3.9; 0.1.7 Requires-Python >=3.9; 0.1.8 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement puccinialin (from versions: none)
ERROR: No matching distribution found for puccinialin

分析一下报错原因,安装timm的时候安装了很多别的配套的包,但是我的python是3.7的,别的包药3.9的,所以报错了

解决方法

下载的时候换一个低版本的timm,首先看一下我能适配什么版本,用这个命令:

pip install timm==

肯定会报错,但无所谓,这样能看到什么样的版本适合3.7的python,然后挑选一个合适的版本安装,最终我安装的是:

pip install timm==0.6.13

总结

我的问题原因是安装的包python版本不符,对症下药,再去csdn搜索问题所在,如何解决,不能盲目按照方法走,会耽误时间。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐