-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Closed as not planned
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Currently, it fails like this, which isn't very helpful:
$ PYTHONHOME=inexistent ./python
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
Exception ignored in the internal traceback machinery:
ModuleNotFoundError: No module named 'traceback'
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000076eaa9477740 (most recent call first):
<no Python frame>
After getpath
is done, we could try to detect a bad sys.path
list and provide a better error.
This is something that I have personally hit several times (though I might not represent the regular user π
), and the first time it took me a little bit to figure out that this means that we messed up the sys.path
calculation. I have seen a couple users also run into this in CI environments, where it is very difficult to debug and try to reproduce, so unless you know that spotting "Failed to import encodings module" usually means sys.path
got somehow messed up, it's very difficult to deal with it.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
rruuaanng
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement