Message162425
In Python/pythonrun.c the following definition exists:
static wchar_t *progname = L"python";
This is then used by Py_GetProgramName which is used by calculate_path in Modules/getpath.c
Since in python 3, the default executable is python3, and not python, when calculate_path searches for "python" it will find where python 2 is installed instead of where python3 is installed. This is the error message that this causes:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
I recommend that line be changed to:
static wchar_t *progname = L"python3";
since that is the default executable name.
For my purposes (which is making an executable that embedds python 3), I was able to work around this by calling:
Py_SetProgramName(L"python3");
before
Py_Initialize(); |
|
Date |
User |
Action |
Args |
2012-06-06 22:37:29 | Joshua.Cogliati | set | recipients:
+ Joshua.Cogliati |
2012-06-06 22:37:29 | Joshua.Cogliati | set | messageid: <1339022249.32.0.319991311655.issue15020@psf.upfronthosting.co.za> |
2012-06-06 22:37:28 | Joshua.Cogliati | link | issue15020 messages |
2012-06-06 22:37:28 | Joshua.Cogliati | create | |
|