INADA Naoki <songofaca...@gmail.com> added the comment:

> We should maybe dump sys.path into stderr on the specific "unable to load the 
> file system codec" error.

In addition to sys.path, I think "What's current python home (prefix and 
exec-prefix), and where it come from" is very useful.

I recently fixed Vim's bug. https://github.com/vim/vim/pull/2787

Vim called Py_SetPythonHome with path of Python when vim is compiled.  After 
reinstalling Python to another directory, vim fails with "no module named 
encoding" error everytime.  This suffered many homebrew users because homebrew 
use different directory to install Python every revisions.

Python home will be come from different locations:

* Calculated from Python executable path
* Embedded in Python static/dynamic library
* PYTHONHOME environment variable
* Py_SetPythonHome()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33611>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to