Message366075
> I continually get the error
> "Fatal Python error: Py_Initialize: unable to load the file system codec
> ImportError: No module named 'encodings'"
FYI I enhanced this error in Python 3.8 to "dump the Python path configuration". Example:
$ PYTHONHOME=x PYTHONPATH=y python3.8
Python path configuration:
PYTHONHOME = 'x'
PYTHONPATH = 'y'
program name = 'python3.8'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3.8'
sys.base_prefix = 'x'
sys.base_exec_prefix = 'x'
sys.executable = '/usr/bin/python3.8'
sys.prefix = 'x'
sys.exec_prefix = 'x'
sys.path = [
'y',
'x/lib64/python38.zip',
'x/lib64/python3.8',
'x/lib64/python3.8/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f50aaad8740 (most recent call first):
<no Python frame>
It should be easier for users to understand their mistake.
In general, leave PYTHONHOME empty/unset unless you understand very well what you are doing ;-) |
|
Date |
User |
Action |
Args |
2020-04-09 15:57:25 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, skrah, zach.ware, steve.dower, lauer@wpi.edu, Sabuj Pattanayek, ergun |
2020-04-09 15:57:25 | vstinner | set | messageid: <1586447845.34.0.341721710014.issue27054@roundup.psfhosted.org> |
2020-04-09 15:57:25 | vstinner | link | issue27054 messages |
2020-04-09 15:57:25 | vstinner | create | |
|