gem5-users@gem5.org

The gem5 Users mailing list

View all threads

[m5-users] Using a non-default Python installation

BW
Bartosz Wojciechowski
Fri, Mar 11, 2011 3:24 PM

Hi Everyone!

I'm trying to run M5 on a fancy big-iron cluster, but have stumbled upon
some problems with python. The only available version is 2.3.4, so i had
to install python, scons and swig in my home directory, and this is what
i get:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/init.py", line 39, in <module>
import SimObject
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in
<module>
from m5.util import *
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/util/init.py", line 38, in
<module>
from code_formatter import code_formatter
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28,
in <module>
import inspect
File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module>
from operator import attrgetter
ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so:
undefined symbol: _Py_TrueStruct

I tried reading
http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation
but since this page has last been updated on 29 August 2006, at 18:26, i
was wondering whether anyone has tried running M5 with $HOME-installed
Python recently. Preferably on Scientific Linux SL release 4.5 :-)

--
Greetings,
Bartosz Wojciechowski

Hi Everyone! I'm trying to run M5 on a fancy big-iron cluster, but have stumbled upon some problems with python. The only available version is 2.3.4, so i had to install python, scons and swig in my home directory, and this is what i get: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/bartek/m5/src/python/importer.py", line 73, in load_module exec code in mod.__dict__ File "/home/bartek/m5/src/python/m5/__init__.py", line 39, in <module> import SimObject File "/home/bartek/m5/src/python/importer.py", line 73, in load_module exec code in mod.__dict__ File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in <module> from m5.util import * File "/home/bartek/m5/src/python/importer.py", line 73, in load_module exec code in mod.__dict__ File "/home/bartek/m5/src/python/m5/util/__init__.py", line 38, in <module> from code_formatter import code_formatter File "/home/bartek/m5/src/python/importer.py", line 73, in load_module exec code in mod.__dict__ File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28, in <module> import inspect File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module> from operator import attrgetter ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so: undefined symbol: _Py_TrueStruct I tried reading http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation but since this page has last been updated on 29 August 2006, at 18:26, i was wondering whether anyone has tried running M5 with $HOME-installed Python recently. Preferably on Scientific Linux SL release 4.5 :-) -- Greetings, Bartosz Wojciechowski
D
Digant
Fri, Mar 11, 2011 3:27 PM

Try this:
http://search.gmane.org/?query=undefined+symbol%3A+_Py_ZeroStruct&group=gmane.comp.emulators.m5.users

Regards,
Digant Desai.

On Fri, Mar 11, 2011 at 08:24, Bartosz Wojciechowski <
bartosz.wojciechowski(a)pwr.wroc.pl> wrote:

Hi Everyone!

I'm trying to run M5 on a fancy big-iron cluster, but have stumbled upon
some problems with python. The only available version is 2.3.4, so i had
to install python, scons and swig in my home directory, and this is what
i get:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/init.py", line 39, in <module>
import SimObject
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in
<module>
from m5.util import *
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/util/init.py", line 38, in
<module>
from code_formatter import code_formatter
File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
exec code in mod.dict
File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28,
in <module>
import inspect
File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module>
from operator import attrgetter
ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so:
undefined symbol: _Py_TrueStruct

I tried reading
http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation
but since this page has last been updated on 29 August 2006, at 18:26, i
was wondering whether anyone has tried running M5 with $HOME-installed
Python recently. Preferably on Scientific Linux SL release 4.5 :-)

--
Greetings,
Bartosz Wojciechowski


m5-users mailing list
m5-users(a)m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Try this: http://search.gmane.org/?query=undefined+symbol%3A+_Py_ZeroStruct&group=gmane.comp.emulators.m5.users Regards, Digant Desai. On Fri, Mar 11, 2011 at 08:24, Bartosz Wojciechowski < bartosz.wojciechowski(a)pwr.wroc.pl> wrote: > Hi Everyone! > > I'm trying to run M5 on a fancy big-iron cluster, but have stumbled upon > some problems with python. The only available version is 2.3.4, so i had > to install python, scons and swig in my home directory, and this is what > i get: > > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/home/bartek/m5/src/python/importer.py", line 73, in load_module > exec code in mod.__dict__ > File "/home/bartek/m5/src/python/m5/__init__.py", line 39, in <module> > import SimObject > File "/home/bartek/m5/src/python/importer.py", line 73, in load_module > exec code in mod.__dict__ > File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in > <module> > from m5.util import * > File "/home/bartek/m5/src/python/importer.py", line 73, in load_module > exec code in mod.__dict__ > File "/home/bartek/m5/src/python/m5/util/__init__.py", line 38, in > <module> > from code_formatter import code_formatter > File "/home/bartek/m5/src/python/importer.py", line 73, in load_module > exec code in mod.__dict__ > File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28, > in <module> > import inspect > File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module> > from operator import attrgetter > ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so: > undefined symbol: _Py_TrueStruct > > I tried reading > http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation > but since this page has last been updated on 29 August 2006, at 18:26, i > was wondering whether anyone has tried running M5 with $HOME-installed > Python recently. Preferably on Scientific Linux SL release 4.5 :-) > > -- > Greetings, > Bartosz Wojciechowski > > _______________________________________________ > m5-users mailing list > m5-users(a)m5sim.org > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users >
SR
Steve Reinhardt
Fri, Mar 11, 2011 4:05 PM

On Fri, Mar 11, 2011 at 7:24 AM, Bartosz Wojciechowski <
bartosz.wojciechowski(a)pwr.wroc.pl> wrote:

Hi Everyone!

I tried reading
http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation
but since this page has last been updated on 29 August 2006, at 18:26, i
was wondering whether anyone has tried running M5 with $HOME-installed
Python recently. Preferably on Scientific Linux SL release 4.5 :-)

Just because the page is old doesn't mean the information is out of date!  I
don't know of any reason those instructions aren't still valid.  That said,
if you follow the instructions there and find the information incorrect or
even just unclear, please take the time to update the wiki for future users.

Thanks,

Steve

On Fri, Mar 11, 2011 at 7:24 AM, Bartosz Wojciechowski < bartosz.wojciechowski(a)pwr.wroc.pl> wrote: > Hi Everyone! > > > I tried reading > http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation > but since this page has last been updated on 29 August 2006, at 18:26, i > was wondering whether anyone has tried running M5 with $HOME-installed > Python recently. Preferably on Scientific Linux SL release 4.5 :-) > > Just because the page is old doesn't mean the information is out of date! I don't know of any reason those instructions aren't still valid. That said, if you follow the instructions there and find the information incorrect or even just unclear, please take the time to update the wiki for future users. Thanks, Steve
NB
nathan binkert
Fri, Mar 11, 2011 5:25 PM

I tried reading
http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation
but since this page has last been updated on 29 August 2006, at 18:26, i
was wondering whether anyone has tried running M5 with $HOME-installed
Python recently. Preferably on Scientific Linux SL release 4.5 :-)

I do this all the time.  The easiest thing to do is build and install
python in your home directory and just make sure that the directory
with the python binary is in your path ahead of the system
directories.  Something like "export PATH=$HOME/local/bin:$PATH"

Honestly, the error below looks like a python problem, not an m5
problem.  What happens if you fire up python and just do "import
inspect".  Do you get the same error?  I'm also not sure if anyone has
used 2.7 with M5 yet, but I'd not expect that to be a problem.

Nate

Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
   exec code in mod.dict
 File "/home/bartek/m5/src/python/m5/init.py", line 39, in <module>
   import SimObject
 File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
   exec code in mod.dict
 File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in
<module>
   from m5.util import *
 File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
   exec code in mod.dict
 File "/home/bartek/m5/src/python/m5/util/init.py", line 38, in
<module>
   from code_formatter import code_formatter
 File "/home/bartek/m5/src/python/importer.py", line 73, in load_module
   exec code in mod.dict
 File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28,
in <module>
   import inspect
 File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module>
   from operator import attrgetter
ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so:
undefined symbol: _Py_TrueStruct

> I tried reading > http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation > but since this page has last been updated on 29 August 2006, at 18:26, i > was wondering whether anyone has tried running M5 with $HOME-installed > Python recently. Preferably on Scientific Linux SL release 4.5 :-) I do this all the time. The easiest thing to do is build and install python in your home directory and just make sure that the directory with the python binary is in your path ahead of the system directories. Something like "export PATH=$HOME/local/bin:$PATH" Honestly, the error below looks like a python problem, not an m5 problem. What happens if you fire up python and just do "import inspect". Do you get the same error? I'm also not sure if anyone has used 2.7 with M5 yet, but I'd not expect that to be a problem. Nate > Traceback (most recent call last): >  File "<string>", line 1, in <module> >  File "/home/bartek/m5/src/python/importer.py", line 73, in load_module >    exec code in mod.__dict__ >  File "/home/bartek/m5/src/python/m5/__init__.py", line 39, in <module> >    import SimObject >  File "/home/bartek/m5/src/python/importer.py", line 73, in load_module >    exec code in mod.__dict__ >  File "/home/bartek/m5/src/python/m5/SimObject.py", line 40, in > <module> >    from m5.util import * >  File "/home/bartek/m5/src/python/importer.py", line 73, in load_module >    exec code in mod.__dict__ >  File "/home/bartek/m5/src/python/m5/util/__init__.py", line 38, in > <module> >    from code_formatter import code_formatter >  File "/home/bartek/m5/src/python/importer.py", line 73, in load_module >    exec code in mod.__dict__ >  File "/home/bartek/m5/src/python/m5/util/code_formatter.py", line 28, > in <module> >    import inspect >  File "/home/bartek/lib/python2.7/inspect.py", line 41, in <module> >    from operator import attrgetter > ImportError: /home/bartek/lib/python2.7/lib-dynload/operator.so: > undefined symbol: _Py_TrueStruct >
BW
Bartosz Wojciechowski
Sun, Mar 13, 2011 12:45 PM
     I tried reading
     http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation
     but since this page has last been updated on 29 August 2006,
     at 18:26, i
     was wondering whether anyone has tried running M5 with
     $HOME-installed
     Python recently. Preferably on Scientific Linux SL release
     4.5 :-)
     

Just because the page is old doesn't mean the information is out of
date!  I don't know of any reason those instructions aren't still
valid.  That said, if you follow the instructions there and find the
information incorrect or even just unclear, please take the time to
update the wiki for future users.

I asked because using --enable-shared made compilation fail. However,
removing my custom python instalation and starting over according to the
wiki worked out just fine!

Thanks to Nathan, Steve and Digant for help!

Greetings,
Bartosz Wojciechowski

> > I tried reading > http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation > but since this page has last been updated on 29 August 2006, > at 18:26, i > was wondering whether anyone has tried running M5 with > $HOME-installed > Python recently. Preferably on Scientific Linux SL release > 4.5 :-) > > > Just because the page is old doesn't mean the information is out of > date! I don't know of any reason those instructions aren't still > valid. That said, if you follow the instructions there and find the > information incorrect or even just unclear, please take the time to > update the wiki for future users. > I asked because using --enable-shared made compilation fail. However, removing my custom python instalation and starting over according to the wiki worked out just fine! Thanks to Nathan, Steve and Digant for help! -- Greetings, Bartosz Wojciechowski