python - gem5 构建失败并显示 "Embedded python library 3.6 or newer required, found 2.7.17."

标签 python gem5

我无法构建gem5,当我构建gem5时,终端显示“需要嵌入式python库3.6或更高版本,找到2.7.17。”。但是,当我检查我的python版本时,我发现我的python版本是3.6。

python --version

Python 3.6.7

最佳答案

gem5 构建环境不使用您的用户环境。这意味着不会设置 PATH 和其他环境变量的自定义值。我的直觉是你的 Python 3 安装是由你的自定义值之一指向的。如果没有这些,gem5 使用 Python 系统安装,在您的情况下是 Python 2。

官方文档中有针对您的情况的部分和修复:Python in a non-default location 。本质上,您应该通过 python3 可执行文件运行 SCons:

python3 `which scons` build/X86/gem5.opt

如果您的 python3-config 可执行文件在系统路径中不可用,您还应该通过 PYTHON_CONFIG 构建变量传递它:

python3 `which scons` PYTHON_CONFIG=python3-config build/X86/gem5.opt

关于python - gem5 构建失败并显示 "Embedded python library 3.6 or newer required, found 2.7.17.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69156362/

相关文章:

python - 使用 Python 远程访问 mySQL

python - 我正在尝试解析从互联网上提取的 csv 文件。 python 中的 csv 阅读器将每个字符分成一个列表元素

python - 优雅的字符串方法(如何变得更Pythonic)

c++ - 在gem5中的文件中打印所有cache_blocks

python - 在 gem5 上运行 simple.py 会出现错误 "NameError: name ' DDR3_1600_x6 4' is not defined"

python - 将毫秒级数据读入 pandas

python - Vim 带圆括号和方括号的缩进级别

linux - 将 perf_event 与 gem5 内的 ARM PMU 结合使用

linux - gem5 系统调用仿真 arm C hello world 失败,出现 "fatal: syscall gettid (#224) unimplemented"

time - gem5模拟时间高