From 0fc150ccfc419cba985bb04c1a450e573322a4dd Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Tue, 9 Apr 2024 23:21:05 +0200 Subject: [PATCH] Sys.Path (still) missing some directories in latest 3.0.17 version #322 changed site_import and user_site_directory to overcome the changes introduced with update from python 3.10 -> 3.12 and changed config handling --- PythonScript/src/PythonHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonScript/src/PythonHandler.cpp b/PythonScript/src/PythonHandler.cpp index 2964bac6..47ab0e68 100644 --- a/PythonScript/src/PythonHandler.cpp +++ b/PythonScript/src/PythonHandler.cpp @@ -97,9 +97,9 @@ void PythonHandler::initPython() // Don't import site - if Python 2.7 doesn't find it as part of Py_Initialize, // it does an exit(1) - AGH! // unclear if this is still the case with python 3.12 - config.site_import = 0; + config.site_import = 1; config.use_environment = 0; - config.user_site_directory = 0; + config.user_site_directory = 1; #ifdef _DEBUG config.verbose = 1;