File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
source/plugins/Sea5kg/Python3Scripting/src Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,20 @@ void Sea5kgPython3Scripting_editorplugin::runPythonScript(ModelExtension *pModel
317317 QString sPythonHome = QCoreApplication::applicationDirPath () + " /plugins/Sea5kg/Python3Scripting/Python3Home/" ;
318318 log_info (" PYTHONHOME=" + sPythonHome );
319319 qputenv (" PYTHONHOME" , sPythonHome .toLatin1 ());
320+
321+ // https://docs.python.org/3/using/cmdline.html
322+
320323 log_info (" PYTHONUNBUFFERED=1" );
321324 qputenv (" PYTHONUNBUFFERED" , " 1" );
325+ log_info (" PYTHONUSERBASE=1" );
326+ qputenv (" PYTHONUSERBASE" , " 1" );
327+
328+
329+ // QString sLdLibraryPath = QString(qgetenv("LD_LIBRARY_PATH"));
330+ QString sPythonPath = " " ;
331+ sPythonPath += QCoreApplication::applicationDirPath () + " /plugins/Sea5kg/Python3Scripting/Python3Home/lib/python3.10/lib-dynload/" + " :" ;
332+ sPythonPath += QCoreApplication::applicationDirPath () + " /plugins/Sea5kg/Python3Scripting/Python3Home/" + " :" ;
333+ qputenv (" PYTHONPATH" , sPythonPath .toLatin1 ());
322334
323335 // QProcessEnvironment proc
324336
You can’t perform that action at this time.
0 commit comments