Python 2.7 segfaults on 'import site'
Chris Angelico
rosuav at gmail.com
Mon Dec 29 11:10:35 EST 2014
On Tue, Dec 30, 2014 at 2:57 AM, Dave Angel <davea at davea.name> wrote:
> My gut feeling is you should check if there is another site.py* anywhere on
> your system. (Use find rather than just manually checking the sys.path
> locations)
I used imp.find_module and it showed the one in
/usr/lib/python2.7/site.py would be used. However, I did find one
point of interest: site.py is *not* loaded from the current directory,
hence the difference between "python" and "python -S -c 'import
site'". Also, importing any of a bunch of other modules also
segfaults. I haven't yet tracked down the ultimate cause of the crash,
but it could be any module that gets imported by a bunch of other
modules. My current suspicion is on re.py, or something it imports.
ChrisA
More information about the Python-list
mailing list