- Notifications
You must be signed in to change notification settings - Fork750
-
Environment
Details
varpythonHome= $"{Application.streamingAssetsPath}/{PythonFolder}";varpythonPath=string.Join(";", $"{pythonHome}/Lib/site-packages", $"{pythonHome}/{PythonZip}", $"{pythonHome}" );varscripts= $"{pythonHome}/Scripts";varpath=Environment.GetEnvironmentVariable("PATH")?.TrimEnd(';');path=string.IsNullOrEmpty(path) ? $"{pythonHome};{scripts}" : $"{pythonHome};{scripts};{path}";Environment.SetEnvironmentVariable("PATH",path,EnvironmentVariableTarget.Process);Environment.SetEnvironmentVariable("DYLD_LIBRARY_PATH", $"{pythonHome}/Lib",EnvironmentVariableTarget.Process);Environment.SetEnvironmentVariable("PYTHONNET_PYDLL", $"{pythonHome}/{PythonDll}",EnvironmentVariableTarget.Process);PythonEngine.PythonHome=pythonHome;PythonEngine.PythonPath=pythonPath;Runtime.PythonDLL= $"{pythonHome}/{PythonDll}";PythonEngine.Initialize();
Win32Exception:找不到指定的模块。RethrowasDllNotFoundException:CouldnotloadD:/USD_中文/USD_中文/UnityApp/FactoryStream_Data/StreamingAssets/python-3.11.3-embed-amd64/python311.dll.atPython.Runtime.Platform.WindowsLoader.Load (System.StringdllToLoad) [0x00037]in<e6978fb1f69f4558807e0a3431702c70>:0atPython.Runtime.Runtime+Delegates.GetUnmanagedDll (System.StringlibraryName) [0x00009]in<e6978fb1f69f4558807e0a3431702c70>:0atPython.Runtime.Runtime+Delegates..cctor () [0x0000a]in<e6978fb1f69f4558807e0a3431702c70>:0RethrowasTypeInitializationException:The typeinitializerfor'Delegates'threwanexception.atPython.Runtime.Runtime.PyGILState_Ensure () [0x00000]in<e6978fb1f69f4558807e0a3431702c70>:0atPython.Runtime.PythonEngine.AcquireLock () [0x00000]in<e6978fb1f69f4558807e0a3431702c70>:0atPython.Runtime.Py+GILState..ctor () [0x00006]in<e6978fb1f69f4558807e0a3431702c70>:0atPython.Runtime.Py.GIL () [0x00007]in<e6978fb1f69f4558807e0a3431702c70>:0atFSM.USD.UsdEngine.Init () [0x00000]in<409251060049431d992f8d5358cc24fc>:0atFSM.USD.UsdEngine..ctor () [0x00006]in<409251060049431d992f8d5358cc24fc>:0at (wrappermanaged-to-native)System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)atSystem.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Objectobj,System.Object[]parameters,System.BooleanwrapExceptions) [0x00005]in<321eb2db7c6d43ea8fc39b54eaca3452>:0RethrowasTargetInvocationException:Exceptionhasbeenthrownbythetargetofaninvocation.atSystem.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Objectobj,System.Object[]parameters,System.BooleanwrapExceptions) [0x0001a]in<321eb2db7c6d43ea8fc39b54eaca3452>:0atSystem.RuntimeType.CreateInstanceMono (System.BooleannonPublic,System.BooleanwrapExceptions) [0x00095]in<321eb2db7c6d43ea8fc39b54eaca3452>:0atSystem.RuntimeType.CreateInstanceSlow (System.BooleanpublicOnly,System.BooleanwrapExceptions,System.BooleanskipCheckThis,System.BooleanfillCache) [0x00009]in<321eb2db7c6d43ea8fc39b54eaca3452>:0atSystem.RuntimeType.CreateInstanceDefaultCtor (System.BooleanpublicOnly,System.BooleanskipCheckThis,System.BooleanfillCache,System.BooleanwrapExceptions,System.Threading.StackCrawlMark&stackMark) [0x00027]in<321eb2db7c6d43ea8fc39b54eaca3452>:0atSystem.Activator.CreateInstance[T] () [0x00015]in<321eb2db7c6d43ea8fc39b54eaca3452>:0atSingleton`1[T]..cctor () [0x00000]in<409251060049431d992f8d5358cc24fc>:0RethrowasTypeInitializationException:The typeinitializerfor'Singleton`1'threwanexception.atProtocolMgrWPF.ImportModelFromCloudLibraryByWpf (SharedMemoryLib.IMsgmsg) [0x00197]in<409251060049431d992f8d5358cc24fc>:0atProtocolMgrWPF.ImportResourceByPathByWPF (SharedMemoryLib.IMsgmessage) [0x00052]in<409251060049431d992f8d5358cc24fc>:0atNetManager.MessageUpdate () [0x000ba]in<409251060049431d992f8d5358cc24fc>:0atNetManager.FixedUpdate () [0x00000]in<409251060049431d992f8d5358cc24fc>:0 Greetings! |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
你把中文目录改成英文试一下, |
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
Converted from issue
This discussion was converted from issue #2502 on April 11, 2025 04:57.