Rhino Compute - Python 3.9.10 is not yet ready or failed initialization

Hi there,

I have a similar issue i think than here on my distant server. Sorry in advance it this post is a duplicate, but i didn’t find my solution in the other and got afraid the comment would get lost.

Here’s my specific issue: i have a distant Compute Server i installed with IIS. It worked just fine a few days ago but broke this monday when it was sent a compute request. To debug i tried to open a file with the GUI and it seems it is related to a Python installation. I have to say, i didn’t “untick” the “Automatically update packages when Rhino starts”, don’t know if this could be related.

Here are the logs from RhinoCodeLogs

Info 07/15/2024 12:51:01 [RhinoCode] Language Registered: Plain Text 1.0 (rhinocode.builtin.text)
Info 07/15/2024 12:51:01 [RhinoCode] Language Registered: JSON 1.0 (rhinocode.builtin.json)
Info 07/15/2024 12:51:01 [RhinoCode] Storage Site Registered: Local Drive (mcneel.eto.file)
Info 07/15/2024 12:51:01 [RhinoCode] Storage Site Registered: Rhino Files (mcneel.rhinoFiles.file)
Info 07/15/2024 12:51:01 [RhinoCode] Storage Site Registered: Web (mcneel.eto.http)
Info 07/15/2024 12:51:01 [RhinoCode] Rhino3D Initialized on Windows - NETCoreApp
Info 07/15/2024 12:51:01 [RhinoCode] Platform Registered: Rhinoceros 3D @ 8.8.24170.13001 (mcneel.rhino3d.rhino)
Info 07/15/2024 12:51:01 [RhinoCode] Operating System: Microsoft Windows NT 10.0.20348.0
Info 07/15/2024 12:51:01 [RhinoCode] RhinoCode server starting on \\.\pipe\rhinocode_remotepipe_6864
Info 07/15/2024 12:51:09 [RhinoCode] Language Loader Registered: mcneel.pythonnet.python@3.*
Info 07/15/2024 12:51:09 [RhinoCode] Language Loader Registered: mcneel.ironpython.python@2.*
Info 07/15/2024 12:51:09 [RhinoCode] Language Loader Registered: mcneel.roslyn.csharp@9.*
Info 07/15/2024 12:51:09 [RhinoCode] Language Loader Registered: mcneel.gh1.grasshopper@1.*
Info 07/15/2024 12:51:09 [RhinoCode] Language Loader Registered: mcneel.markdig.markdown@0.*
Info 07/15/2024 12:51:09 [RhinoCode] Using existing runtime: CPython 3.9.10/43 (x64)
Info 07/15/2024 12:51:09 [RhinoCode] Initializing CPython 3.9.10/43 runtime
Info 07/15/2024 12:51:09 [RhinoCode] Deploying python packages
Info 07/15/2024 12:51:09 [RhinoCode] Deploying package from "site-interop.zip"
Info 07/15/2024 12:51:09 [RhinoCode] Deploying package from "utils.zip"
Info 07/15/2024 12:51:09 [RhinoCode] Deploying package from "pylint-2.10.2-py3-none-any.whl"
Info 07/15/2024 12:51:09 [RhinoCode] Running process: C:\Users\RhinoComputeUser\.rhinocode\py39-rh8\python.exe -s -m pip --disable-pip-version-check install --target "C:\Users\RhinoComputeUser\.rhinocode\py39-rh8\site-support" --progress-bar off --upgrade --no-warn-script-location --retries 0 --timeout 1 --no-dependencies "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\pylint-2.10.2-py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\toml-0.10.2-py2.py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\platformdirs-2.3.0-py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\isort-5.9.3-py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\mccabe-0.6.1-py2.py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\astroid-2.7.3-py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\wrapt-1.12.1-py3-none-any.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl" "C:\Users\RhinoComputeUser\AppData\Local\Temp\2\colorama-0.4.4-py2.py3-none-any.whl"
Error 07/15/2024 12:51:09 [RhinoCode] Process exited with code 1
Error 07/15/2024 12:51:09 [RhinoCode] Error Initializing Python | Error deploying package "pylint-2.10.2-py3-none-any.whl" | C:\Users\RhinoComputeUser\.rhinocode\py39-rh8\python.exe: No module named pip
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.DeployPackages(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.<>c__DisplayClass109_0.<InitRuntime>b__0(Access access)
   at Rhino.Runtime.Code.Languages.Runtime.Access.Run(String id, Action`1 task)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.InitRuntime(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPython`1.Start()
Error 07/15/2024 12:51:09 [RhinoCode] [CPY001] Runtime failed to initialize (Python 3.9.10 (mcneel.pythonnet.python))
Error deploying package "pylint-2.10.2-py3-none-any.whl" | C:\Users\RhinoComputeUser\.rhinocode\py39-rh8\python.exe: No module named pip
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.DeployPackages(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.<>c__DisplayClass109_0.<InitRuntime>b__0(Access access)
   at Rhino.Runtime.Code.Languages.Runtime.Access.Run(String id, Action`1 task)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.InitRuntime(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPython`1.Start()
Info 07/15/2024 12:51:09 [RhinoCode] Added Python 3.9.10 (mcneel.pythonnet.python) search path: C:\Users\RhinoComputeUser\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 07/15/2024 12:51:09 [RhinoCode] Language Registered: Python 3.9.10 (mcneel.pythonnet.python)
Info 7/15/2024 12:51:23 PM [RhinoCode] Language Registered: IronPython 2.7.12 (mcneel.ironpython.python)
Info 7/15/2024 12:51:25 PM [RhinoCode] Added C# 9.0 (mcneel.roslyn.csharp) search path: C:\Users\RhinoComputeUser\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 7/15/2024 12:51:25 PM [RhinoCode] Language Registered: C# 9.0 (mcneel.roslyn.csharp)
Info 7/15/2024 12:51:25 PM [RhinoCode] Language Registered: Grasshopper 1.0 (mcneel.gh1.grasshopper)
Info 7/15/2024 12:51:25 PM [RhinoCode] Language Registered: Markdown 0.30.4 (mcneel.markdig.markdown)

Any idea how to deal with this issue? Any help would be appreciated… Thanks a lot!

The .rhinocode Python 3’s not found its pip.

pip is still an incredibly useful part of CPython 3 components. But for everything else, could this step be skipped, for those of us, for whom isort and pylint etc. are superfluous?

Yeah i guess it could be either skipper or installed manually. I didn’t really investigate this, as it seems it may come from the install.
Reupdating the deployment as described here didn’t solve the issue.

Yes. My last paragraph was a request from McNeel, not from yourself. It looks to me like this is a bug (I don’t know if it’s known).

Hi! Is there any update on this topic please?

I now also have the issue with my local server, even though it didn’t happen before. I’m a bit lost as why this changed, i don’t remember changing anything.

CG  [15:39:58 ERR] Language Python 3.9.10 (mcneel.pythonnet.python) is not yet ready or failed initialization: component "Python 3 Script" (edff3f8e-558b-4027-8b02-a86de571ba6d)
CG  [15:39:58 ERR] Language Python 3.9.10 (mcneel.pythonnet.python) is not yet ready or failed initialization: component "Python 3 Script" (487e77e9-6ce7-4382-b24a-39248724a8f3)
CG  [15:39:58 ERR] Language Python 3.9.10 (mcneel.pythonnet.python) is not yet ready or failed initialization: component "Python 3 Script" (ff9daea7-ab20-410f-b0e9-6862c13ab669)

@eirannejad maybe from other post? Sorry for being pushy but i’m lost on the sustainability of my models that seem to break one after the other…

Hi Quentin, Ehsan is the best person to troubleshoot this, unfortunately he’s a bit under the weather at the moment and we might not hear from him for a few days. I’ll also throw this at the Compute devs and see if they have any suggestions.

Hi Japhy, ok thanks for the feedback. Hope Ehsan will be going better soon.
Let me know if you have any update, or if there is anything i can do to help find the solution!

@Quentin1 Is this still an issue. Would you be able to collect all the logs from ~/.rhinocode/logs folder on your compute server? this way we can see why the language init fails. Also please make sure you have the latest Rhino and compute just to be sure

Hi @eirannejad hope you’re doing better.
The issue is still here. I’ll attach the full log folder since it “used to work”, hope it will help.

Logs Python issue.zip (48.4 KB)

Best

@Quentin1 I can see the python runtime fails setting up since it can not install pip correctly and therefore all other package installs fail.

Would you mind resetting the runtime by going to the editor Tools > Advanced > Reset Python 3 Runtime menu and restarting Rhino? After Rhino is ready, run the ScriptEditor command and let is initialize. Then grab all the logs from RhinoCodeLogs command in case any errors occured. This helps me see why pip installation fails.

Hi Ehsan,
It seems that it worked. If it’s okay i’ll check a bit further next week and let you know if some issues happen.
Thanks a lot for your help and nice weekend

1 Like

Hi I’m facing the same error. I’m unable to load Python component:

Info 10/08/2024 09:15:24 [RhinoCode] Language Registered: Plain Text 1.0 (rhinocode.builtin.text)
Info 10/08/2024 09:15:24 [RhinoCode] Language Registered: JSON 1.0 (rhinocode.builtin.json)
Info 10/08/2024 09:15:24 [RhinoCode] Language Registered: Git DotFile 1.0 (rhinocode.builtin.gitDotFile)
Info 10/08/2024 09:15:24 [RhinoCode] Language Registered: Yaml 1.0 (rhinocode.builtin.yaml)
Info 10/08/2024 09:15:24 [RhinoCode] Storage Site Registered: Local Drive (mcneel.eto.file)
Info 10/08/2024 09:15:24 [RhinoCode] Storage Site Registered: Rhino Files (mcneel.rhinoFiles.file)
Info 10/08/2024 09:15:24 [RhinoCode] Storage Site Registered: Web (mcneel.console.http)
Info 10/08/2024 09:15:24 [RhinoCode] Rhino3D Initialized on Windows - NETCoreApp
Info 10/08/2024 09:15:24 [RhinoCode] Platform Registered: Rhinoceros 3D @ 8.12.24275.15001 (mcneel.rhino3d.rhino)
Info 10/08/2024 09:15:24 [RhinoCode] Storage Site Registered: Rhino3D Project (mcneel.rhino3d.project)
Info 10/08/2024 09:15:24 [RhinoCode] Operating System: Microsoft Windows NT 10.0.22631.0
Info 10/08/2024 09:15:24 [RhinoCode] RhinoCode server starting on \\.\pipe\rhinocode_remotepipe_39488
Info 10/08/2024 09:20:48 [RhinoCode] Language Loader Registered: mcneel.pythonnet.python@3.*
Info 10/08/2024 09:20:48 [RhinoCode] Language Loader Registered: mcneel.ironpython.python@2.*
Info 10/08/2024 09:20:48 [RhinoCode] Language Loader Registered: mcneel.roslyn.csharp@9.*
Info 10/08/2024 09:20:48 [RhinoCode] Language Loader Registered: mcneel.gh1.grasshopper@1.*
Info 10/08/2024 09:20:48 [RhinoCode] Language Loader Registered: mcneel.markdig.markdown@0.*
Info 10/08/2024 09:20:49 [RhinoCode] Using existing runtime: CPython 3.9.10/43 (x64)
Info 10/08/2024 09:20:49 [RhinoCode] Initializing CPython 3.9.10/43 runtime
Info 10/08/2024 09:20:50 [RhinoCode] Deploying python packages
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "site-interop.zip"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "utils.zip"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "pylint-2.10.2-py3-none-any.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "pyflakes-2.4.0-py2.py3-none-any.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "pycodestyle-2.8.0-py2.py3-none-any.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "jedi-0.19.2-py2.py3-none-any.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "black-21.8b0-py3-none-any.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "pywin32-302-cp39-cp39-win_amd64.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Deploying package from "psutil-5.9.1-cp39-cp39-win_amd64.whl"
Info 10/08/2024 09:20:50 [RhinoCode] Saving CPython runtime configs
Info 10/08/2024 09:20:50 [RhinoCode] PYTHONHOME: \\?\C:\Users\vinod.thomas\.rhinocode\py39-rh8
Info 10/08/2024 09:20:50 [RhinoCode] PYTHONPATH: 
Info 10/08/2024 09:20:50 [RhinoCode] Loading CPython engine from C:\Users\vinod.thomas\.rhinocode\py39-rh8\McNeel.Python39.Runtime.dll
Error 10/08/2024 09:21:09 [RhinoCode] Error Initializing Python | Error loading CPython engine | System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'HelixToolkitM.Wpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=52aa3500039caf0d'. The system cannot find the file specified.
File name: 'HelixToolkitM.Wpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=52aa3500039caf0d'
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeMethodInfo.<get_Signature>g__LazyCreateSignature|25_0()
   at System.Reflection.RuntimeMethodInfo.ToString()
   at Python.Runtime.MaybeMethodBase`1..ctor(T mi)
   at Python.Runtime.MaybeMethodBase`1.op_Implicit(T ob)
   at Python.Runtime.MethodObject..ctor(MaybeType type, String name, MethodBase[] info, Boolean allow_threads)
   at Python.Runtime.MethodObject..ctor(MaybeType type, String name, MethodBase[] info)
   at Python.Runtime.ClassManager.GetClassInfo(Type type, ClassBase impl)
   at Python.Runtime.ClassManager.InitClassBase(Type type, ClassBase impl, ReflectedClrType pyType)
   at Python.Runtime.ReflectedClrType.GetOrCreate(Type type, Boolean reflected)
   at Python.Runtime.ClassManager.GetClass(Type type)
   at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)
   at Python.Runtime.ModuleObject.LoadNames()
   at Python.Runtime.ImportHook.UpdateCLRModuleDict()
   at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize()
   at Python.Runtime.RhinoCodePythonEngine.Start()
   at Python.Runtime.RhinoCodePythonEngine..ctor(String enigneRoot, Int32 major, Int32 minor)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.LoadEngine(CPythonStartupSteps startup) | Inner: System.IO.FileNotFoundException: Could not load file or assembly 'HelixToolkitM.Wpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=52aa3500039caf0d'. The system cannot find the file specified.
File name: 'HelixToolkitM.Wpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=52aa3500039caf0d'
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeMethodInfo.<get_Signature>g__LazyCreateSignature|25_0()
   at System.Reflection.RuntimeMethodInfo.ToString()
   at Python.Runtime.MaybeMethodBase`1..ctor(T mi)
   at Python.Runtime.MaybeMethodBase`1.op_Implicit(T ob)
   at Python.Runtime.MethodObject..ctor(MaybeType type, String name, MethodBase[] info, Boolean allow_threads)
   at Python.Runtime.MethodObject..ctor(MaybeType type, String name, MethodBase[] info)
   at Python.Runtime.ClassManager.GetClassInfo(Type type, ClassBase impl)
   at Python.Runtime.ClassManager.InitClassBase(Type type, ClassBase impl, ReflectedClrType pyType)
   at Python.Runtime.ReflectedClrType.GetOrCreate(Type type, Boolean reflected)
   at Python.Runtime.ClassManager.GetClass(Type type)
   at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)
   at Python.Runtime.ModuleObject.LoadNames()
   at Python.Runtime.ImportHook.UpdateCLRModuleDict()
   at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize()
   at Python.Runtime.RhinoCodePythonEngine.Start()
   at Python.Runtime.RhinoCodePythonEngine..ctor(String enigneRoot, Int32 major, Int32 minor)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.LoadEngine(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.<>c__DisplayClass110_0.<InitRuntime>b__0(Access access)
   at Rhino.Runtime.Code.Languages.Runtime.Access.Run(String id, Action`1 task)
   at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.InitRuntime(CPythonStartupSteps startup)
   at Rhino.Runtime.Code.Languages.PythonNet.CPython`1.Start()
Info 10/08/2024 09:21:09 [RhinoCode] Added Python 3.9.10 (mcneel.pythonnet.python) search path: C:\Users\vinod.thomas\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 10/08/2024 09:21:09 [RhinoCode] Language Registered: Python 3.9.10 (mcneel.pythonnet.python)
Info 10/08/2024 09:21:11 [RhinoCode] Language Registered: IronPython 2.7.12 (mcneel.ironpython.python)
Info 10/08/2024 09:21:12 [RhinoCode] Added C# 9.0 (mcneel.roslyn.csharp) search path: C:\Users\vinod.thomas\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 10/08/2024 09:21:12 [RhinoCode] Language Registered: C# 9.0 (mcneel.roslyn.csharp)
Info 10/08/2024 09:21:12 [RhinoCode] Language Registered: Grasshopper 1.0 (mcneel.gh1.grasshopper)
Info 10/08/2024 09:21:12 [RhinoCode] Language Registered: Markdown 0.30.4 (mcneel.markdig.markdown)
Info 10/08/2024 09:21:46 [RhinoCode] Begin editing Python 3 Script (b185c009-3167-4602-b3e2-2705a7335b1f) as text
Info 10/08/2024 09:21:46 [RhinoCode] Parsing configs schema "https://files.mcneel.com/schemas/rhinocode/editor.schema.v1.json" in C:\Users\vinod.thomas\.rhinocode\editor.json
![image|690x398](upload://dEEZrOCeFhk1HvNvjD7iOPclUlf.png)
 



Pls Help SOS

EDIT: The problem does not exist when I run Rhino as admin. But when i do that, handful of grasshopper Plugins disappear.

@VAT

It seems to be a conflict with Helix Toolkit (HelixToolkitM.Wpf dll). Is that a plugin installed on your Rhino? Does removing the plugin fix the issue?

Thanks Ehsan,

Figured it out. There were two major errors: one was Language initialization error - This i fixed with a reinstall of Rhino - AS ADMIN! Second, for the Helixtoolkit.Wpf, I had to uninstall Human UI.
Thankyou for the continued support

1 Like