Skip to content

Commit e5fe0d0

Browse files
committed
Add a way to customize the python path/version
First try to use any custom python paths then use the default embedded version. ]
1 parent 200f644 commit e5fe0d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

DSPythonNet3/DSPythonNet3Evaluator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,12 @@ internal static void InstallPython()
327327
{
328328
try
329329
{
330-
Python.Runtime.Runtime.PythonDLL = Python.Included.Installer.PYTHON_VERSION + ".dll";
330+
// First try the custom ways of supplying the python dll name (environment variables, or static API calls)
331+
if (string.IsNullOrEmpty(Runtime.PythonDLL))
332+
{
333+
Runtime.PythonDLL = Python.Included.Installer.PYTHON_VERSION + ".dll";
334+
}
335+
331336
Python.Included.Installer.SetupPython().Wait();
332337
isPythonInstalled = true;
333338
}

0 commit comments

Comments
 (0)