Author christian.heimes
Recipients benjamin.peterson, christian.heimes, ncoghlan
Date 2008-11-20.21:01:10
SpamBayes Score 7.52869e-08
Marked as misclassified No
Message-id <>
In-reply-to <>
Nick Coghlan wrote:
> Nick Coghlan <> 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__
 >>> __package__
 >>> __file__
 >>> __file__ is None

However a pdb session has revealed some interesting things including the 
reason for the "bug".

$ ./python -m site
-> try:
(Pdb) w
-> try:
(Pdb) p mod_name, set_argv0
('site', 1)
(Pdb) n
-> loader, code, fname = _get_module_details(mod_name)
(Pdb) n
-> pkg_name = mod_name.rpartition('.')[0]
(Pdb) p loader, code, fname
(<zipimporter object 
<code object <module> at 0x7fe765e95f30, file 
"build/bdist.linux-x86_64/egg/", line 1>, None)
(Pdb) p code
<code object <module> at 0x7fe765e95f30, file 
"build/bdist.linux-x86_64/egg/", line 1>

Solution for my issue:
$ sudo rm -rf /usr/local/lib/python2.6/site-packages/

Thanks for listening ... :/ I'm feeling embarrassed

Date User Action Args
2008-11-20 21:01:11christian.heimessetrecipients: + christian.heimes, ncoghlan, benjamin.peterson
2008-11-20 21:01:11christian.heimeslinkissue4082 messages
2008-11-20 21:01:10christian.heimescreate