我正在尝试使用arm-none-eabi-gdb作为我的stm32项目的调试器,但是当我尝试执行它时,它返回以下错误:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f75639ddc00 (most recent call first):
Aborted (core dumped)
我在网上查看并找到了这个解决方案,但是当我输入export PYTHONHOME=/usr/local
时,它会发出恼人的错误消息,我找不到任何解决方案:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fcc24680c00 (most recent call first):
Aborted (core dumped)
我已经检查了我的python和python3是否正常工作,有什么我应该检查的吗?
谢谢~
我使用的arm gcc_tool_chain版本是11.2-2022.02,用于托管的x86_64 Linux,这是我从官方网站下载的。下载之后,我只需将其解压缩并将工具链目录添加到$PATH
中即可。我没有编译或安装,我也不确定我是否应该这样做,因为我下载二进制version(gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz)和arm-none g++编译器是完全正确的。
发布于 2022-10-04 06:41:13
我想你截断了你收到的信息!我也有同样的问题。arm-none-eabi-gdb寻找特定的python版本,在消息的末尾解释!我的是3.8,而我已经有3.10。因此,我决定在安装版本的同时安装python3.8。经过一番搜索,我找到了一种方法:
sudo add-apt-repository ppa:deadsnakes/ppasudo
apt update
sudo apt install python3.8
您可以在这站点中找到更多信息。
https://stackoverflow.com/questions/72187185
复制相似问题