Enable setting PYTHONHOME to support applications that distribute Python
ndjensen opened this issue · 1 comments
ndjensen commented
There's been a request to set PYTHONHOME for an application that distributes Python with the application. The Python C-API also supports this:
- https://docs.python.org/2/c-api/init.html#c.Py_SetPythonHome
- https://docs.python.org/3/c-api/init.html#c.Py_SetPythonHome
There's an open question of the route to take to set it: if we should use the C-API call Py_SetPythonHome(arg)
or use Java's System.loadLibrary("python")
or System.load(filename)
.
See https://groups.google.com/forum/#!topic/jep-project/9TOYn3ElbFw for more details.
bsteffensmeier commented
This has been implemented in version 3.8 with PyConfig.setPythonHome as well as the LibraryLocator which attempts to load libjep and libpython from the PYTHONHOME