I follow the instructions on gem5 website and try to compile using command scons build/X86/gem5.opt -j 4
.
However, it shows such error: "Error: Can't find a working Python installation”.
My environment is M2 MacBook Air, gem5 v22.1.0.0.
I’m sure that I have already installed Python 3.11.4 on my machine.
When I type which python
in my zsh, it shows /opt/homebrew/opt/python@3.11/libexec/bin/python
.
When I type which python-config
, it shows /opt/homebrew/opt/python@3.11/libexec/bin/python-config
.
I have searched the web and tried to add PYTHON_CONFIG=<PATH-TO-PYCONFIG>
, but it doesn’t work.
I have no idea why scons
can’t find my Python.
Hi,
With the current latest version of gem5, you must use python <= 3.10. Python 3.11 will be supported in the next release of gem5 coming very soon.
For details: https://gem5.atlassian.net/browse/GEM5-1295
Regards,
Gabriel
Hello, I’ve looked through the web you provided and tried python 3.8.17, python 3.9.17, python 3.10.12. None of them solved my problem, the terminal still outputs "Error: Can't find a working Python installation”.
Hi,
With the current latest version of gem5, you must use python <= 3.10. Python 3.11 will be supported in the next release of gem5 coming very soon.
For details: https://gem5.atlassian.net/browse/GEM5-1295
Regards,
Gabriel
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org
Hello,
The default python-config probably picks up your default Python installation (3.11) even if you choose a different Python version to invoke scons.
You could check this by running python-config and checking which link options it produces.
As Gabriel mentioned, Python 3.11 isn’t supported in the stable release of gem5 yet – full support will be added in the upcoming gem5 v23.0 release.
Until then, you could either:
Use the develop
branch of gem5
Make sure you are using the correct python-config
. It looks like you should be able to set this with an environment variable before running scons:
export PYTHON_CONFIG=python3.10-config
You could alternatively find where the list of possible python-config
s is defined (site_scons/gem5_scons/defaults.py
) and add e.g. python3.10-config
at a higher priority.
Cherry pick the following three patches onto gem5 v22.1:
https://gem5-review.googlesource.com/c/public/gem5/+/70237
https://gem5-review.googlesource.com/c/public/gem5/+/68818
https://gem5-review.googlesource.com/c/public/gem5/+/68817
There is more information in this thread:
https://www.mail-archive.com/gem5-users@gem5.org/msg21505.html
I hope one of these options fixes your problem!
Best regards,
Richard.
From: 李明轩 via gem5-users gem5-users@gem5.org
Sent: Tuesday, June 20, 2023 8:41 PM
To: gem5-users@gem5.org
Cc: 李明轩 2000012801@stu.pku.edu.cn
Subject: [gem5-users] Re: Help: "Error: Can't find a working Python installation"
Hello, I’ve looked through the web you provided and tried python 3.8.17, python 3.9.17, python 3.10.12. None of them solved my problem, the terminal still outputs "Error: Can't find a working Python installation”.
Hi,
With the current latest version of gem5, you must use python <= 3.10. Python 3.11 will be supported in the next release of gem5 coming very soon.
For details: https://gem5.atlassian.net/browse/GEM5-1295
Regards,
Gabriel
gem5-users mailing list -- gem5-users@gem5.orgmailto:gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.orgmailto:gem5-users-leave@gem5.org
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.