Runtime.PythonDLL = @"C:\Python38\python38.dll"; var pathToVirtualEnv = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..\venv")); Console.WriteLine(pathToVirtualEnv); string additional = $"{pathToVirtualEnv};{pathToVirtualEnv}\\Lib\\site-packages;{pathToVirtualEnv}\\Lib"; PythonEngine.PythonPath = PythonEngine.PythonPath + ";" + additional; Console.WriteLine(PythonEngine.PythonPath); PythonEngine.Initialize(); PythonEngine.BeginAllowThreads(); List<object> objParams = new List<object>(); objParams.Add(1+2j); // Complex objParams.Add(2+3j); // Complex PyList myPyLst = new PyList(); for (int nPos = 0; nPos < objParams.Count; nPos++) { myPyLst.Append(objParams[nPos]); } PyObject[] pyParams = new PyObject[2]; pyParams[i] = myPyLst var locals = new PyDict(); PythonEngine.Exec(cmd, null, locals); var execFunc = locals.GetItem("myComplexOperation"); using (Py.GIL()) { PyObject result; result = execFunc.Invoke(pyParams); // here is the problem: // The code works when parameter is String (PyString), Integer (PyInt or PyFloat), PyList (strings, numerics) // but not working when using a PyList with Complex number for Numpy operations. // The return is empty }