[Python-Dev] Segmentaion fault with wrongly set PYTHONPATH on Windows
Victor Stinner
victor.stinner at gmail.com
Mon Oct 22 15:40:20 CEST 2012
2012/10/22 anatoly techtonik <techtonik at gmail.com>:
> Could anybody reopen http://bugs.python.org/issue8766 ? I can't.
> Reproducible 100% with Python 3.2 and 3.3 (3.1 didn't test).
>
>> set PYTHONHOME=C:\
>> python
The issue #8766 is about PYTHONPATH environment variable, not
PYTHONHOME. Test on Linux with Python 3.4:
$ PYTHONHOME=/x ./python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Abandon (core dumped)
It's not a segfault, but an "abort". It's different: abort() is called
by the application (Python) when something goes wrong. In this case,
Python is unable to locate the standard library. It's not a bug: I
asked Python to look in /x directory, whereas this directory doesn't
exist.
> BTW, what is the role of PYTHONPATH on Windows?
> Is it a path for %INSTALLDIR%\Lib\site-packages?
Same role than PYTHONPATH on Linux: specify where third party modules
are installed.
Victor
More information about the Python-Dev
mailing list