zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【错误记录】Python 安装依赖库报错 ( ERROR: Could not find a version that satisfies the requirement elftools )

Python错误安装依赖 报错 Error not 记录
2023-06-13 09:17:59 时间

文章目录

一、报错信息


报错信息 :

ERROR: Could not find a version that satisfies the requirement elftools (from versions: none)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement elftools (from versions: none)
ERROR: No matching distribution found for elftools

二、解决方案


遇到 ERROR: Could not find a version that satisfies the requirement xxx 问题 , 先排除是否是网络问题 , 先试试是否能安装成功 ;

在代码中 , 使用了如下代码 :

from elftools.elf.elffile import ELFFile

elftools.elf.elffile 需要导入依赖库 ;

默认提示 " Install package elftools " , 安装的是 elftools 库 ;

点击 " More Actions … " , 查看是否有其它选项 , 这里还可以安装 pyelftools 库 ;

pyelftools 库安装成功 ;