Message76138
Nick Coghlan wrote:
> Nick Coghlan <ncoghlan@gmail.com> added the comment:
>
> So what could be different between my x86 system and your x86_64 system
> that it works for me and not for you?
>
> Could you try doing "python -i -m site" and poke around in the main
> namespace (which is where the interactive session will start) a bit to
> see if anything looks strange? __file__, __package__ and __name__ are
> probably of particular interest.
That didn't help much
$ ./python -i -m site
>>> __name__
'__main__'
>>> __package__
''
>>> __file__
>>> __file__ is None
True
However a pdb session has revealed some interesting things including the
reason for the "bug".
$ ./python -m site
>
/home/heimes/dev/python/release26-maint/Lib/runpy.py(103)_run_module_as_main()
-> try:
(Pdb) w
>
/home/heimes/dev/python/release26-maint/Lib/runpy.py(103)_run_module_as_main()
-> try:
(Pdb) p mod_name, set_argv0
('site', 1)
(Pdb) n
>
/home/heimes/dev/python/release26-maint/Lib/runpy.py(104)_run_module_as_main()
-> loader, code, fname = _get_module_details(mod_name)
(Pdb) n
>
/home/heimes/dev/python/release26-maint/Lib/runpy.py(117)_run_module_as_main()
-> pkg_name = mod_name.rpartition('.')[0]
(Pdb) p loader, code, fname
(<zipimporter object
"/usr/local/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg">,
<code object <module> at 0x7fe765e95f30, file
"build/bdist.linux-x86_64/egg/site.py", line 1>, None)
(Pdb) p code
<code object <module> at 0x7fe765e95f30, file
"build/bdist.linux-x86_64/egg/site.py", line 1>
Solution for my issue:
$ sudo rm -rf /usr/local/lib/python2.6/site-packages/
Thanks for listening ... :/ I'm feeling embarrassed
Christian |
|
Date |
User |
Action |
Args |
2008-11-20 21:01:11 | christian.heimes | set | recipients:
+ christian.heimes, ncoghlan, benjamin.peterson |
2008-11-20 21:01:11 | christian.heimes | link | issue4082 messages |
2008-11-20 21:01:10 | christian.heimes | create | |
|