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:

1) Use the `develop` branch of gem5

2) 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`

3) 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.

4) 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/[email protected]/msg21505.html

I hope one of these options fixes your problem!

Best regards,

Richard.



From: 李明轩 via gem5-users <[email protected]>
Sent: Tuesday, June 20, 2023 8:41 PM
To: [email protected]
Cc: 李明轩 <[email protected]>
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 -- [email protected]<mailto:[email protected]>
To unsubscribe send an email to 
[email protected]<mailto:[email protected]>

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.
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to