Hey Everyone,

I recently bought a new computer and I downloaded gem5 using the instructions 
on the Building Gem5 website 
(https://www.gem5.org/documentation/general_docs/building), I used the 
instructions for the newest versions of Ubuntu and gem5 shown on the website 
(i.e., “Setup on Ubuntu 22.04 (gem5 >= v21.1)”), which allows me to run the 
newest version of gem5 using this setup.

However, I am now trying to run a previous version of gem5 (i.e., gem5 Version 
20.1.0.2) for a previous project I was working on, and now I’m getting the 
following error:

> *\*\*\* Error loading site_init file ./site_scons/site_init.py:*
>
> *\*\*\* cannot import site init file ./site_scons/site_init.py:*
>
> *ModuleNotFoundError: No module named 'm5':*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 1391:*
>
>     *_exec_main(parser, values)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 1355:*
>
>     *_main(parser)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 978:*
>
>     *_load_all_site_scons_dirs(d.get_internal_path())*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 824:*
>
>     *_load_site_scons_dir(d)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 762:*
>
>     *exec(codeobj, site_m)*
>
>   *File "site_init", line 46:*
>
>     
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/SConscript.py", line 
> 659:*
>
>     *env = self.factory()*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Script/SConscript.py", line 
> 639:*
>
>     *default_env = SCons.Defaults.DefaultEnvironment()*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Defaults.py", line 86:*
>
>     *_default_env = SCons.Environment.Environment(\*args, \*\*kw)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 999:*
>
>     *apply_tools(self, tools, toolpath)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 102:*
>
>     *env.Tool(tool)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 1844:*
>
>     *tool(self)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Tool/__init__.py", line 269:*
>
>     *self.generate(env, \*args, \*\*kw)*
>
>   *File 
> "/home/jzell001/Desktop/gem5/gem5_baseline/site_scons/site_tools/default.py", 
> line 89:*
>
>     *SCons.Tool.Tool(tool)(env)*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Tool/__init__.py", line 119:*
>
>     *module = self._tool_module()*
>
>   *File "/usr/lib/python3/dist-packages/SCons/Tool/__init__.py", line 205:*
>
>     *module = spec.loader.load_module(spec.name)*
>
>   *File "<frozen importlib._bootstrap_external>", line 548:*
>
>     
>
>   *File "<frozen importlib._bootstrap_external>", line 1063:*
>
>     
>
>   *File "<frozen importlib._bootstrap_external>", line 888:*
>
>     
>
>   *File "<frozen importlib._bootstrap>", line 290:*
>
>     
>
>   *File "<frozen importlib._bootstrap>", line 719:*
>
>     
>
>   *File "<frozen importlib._bootstrap>", line 688:*
>
>     
>
>   *File "<frozen importlib._bootstrap_external>", line 883:*
>
>     
>
>   *File "<frozen importlib._bootstrap>", line 241:*
>
>     
>
>   *File 
> "/home/jzell001/Desktop/gem5/gem5_baseline/site_scons/site_tools/git.py", 
> line 45:*
>
>     *import gem5_scons.util*
>
>   *File 
> "/home/jzell001/Desktop/gem5/gem5_baseline/site_scons/gem5_scons/__init__.py",
>  line 46:*
>
>     *from gem5_scons.util import get_termcap*
>
>   *File 
> "/home/jzell001/Desktop/gem5/gem5_baseline/site_scons/gem5_scons/util.py", 
> line 45:*
>
>     *import m5.util.terminal*

When I tried searching online for an answer to this error, one suggestion was 
that it had to do with trying to run gem5 with a newer version of Python/Scons. 
My current versions of Python and Scons are the following:

* Python 3.10.6

* Scons 4.0.1

I wanted to see if anyone had any insight into this and if it is because of 
trying to run an older version of gem5 with too new of versions of Python 
and/or Scons, do I need to go back to Python 2.7 and an older version of Scons, 
or will an older version of Python3 work?

Thank you for your time!

Respectfully,

Jason Z.
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to