Hello,
We have updated to Rhino 8 at our company, however our coworkers can’t use the new Python 3 scripts feature. When they try it, they get the following error message:
Language Python 3.9.10 (mcnell.pythonnet.python) is not yet ready or failed initialization.
By checking the error logs, we identified that Python in Rhino is blocked by group policy (see logs below). I have talked with our IT and they mention that this is a security policy at the User folder level.
My question:
Is it possible to configure the installation path for .rhinocode\py39-rh8\python.exe? For example, to setup the installation at C:\ProgramData\.rhinocode\py39-rh8\.
Logs
Info {date} [RhinoCode] Initializing CPython 3.9.10/43 runtime
Info {date} [RhinoCode] Configuring runtime@py39-rh8 for the first time on X64
Info {date} [RhinoCode] Deploying CPython 3.9.10/43 runtime
Info {date} [RhinoCode] Clearing exiting runtime
Info {date} [RhinoCode] Successfully uninstalled existing runtime at C:\Users\{user}\.rhinocode\py39-rh8
Info {date} [RhinoCode] Installing pip
Info {date} [RhinoCode] Running process: C:\Users\{user}\.rhinocode\py39-rh8\python.exe get_pip.py --no-warn-script-location pip setuptools wheel
Error {date} [RhinoCode] Error Initializing Python | An error occurred trying to start process 'C:\Users\{user}\.rhinocode\py39-rh8\python.exe' with working directory 'C:\Users\{user}\.rhinocode\py39-rh8'. This program is blocked by group policy. For more information, contact your system administrator.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Rhino.Runtime.Code.RhinoCode.RunProcess(String filename, String args, CancellationToken token, Action`1 processConfigurator)
at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.RunPython(String arguments, CancellationToken token, Action`1 processConfigurator)
at Rhino.Runtime.Code.Languages.PythonNet.Attributes.RuntimeBinariesPackage.Deploy(CPythonRuntime runtime)
at Rhino.Runtime.Code.Languages.PythonNet.CPythonRuntime.DeployCPythonRuntime(CPytho
I clean installed Rhino, and I discovered that the folder with py3.9 is defaulting to being hidden. When I unhid it it seemed to have resolved the permissions issue.
@eirannejad@pedrocortes your scripting languages initialization support doc needs to add this hidden folder issue. It seems to be the culprit of the initialization of the language in Script Editor
Did you manage to open the scripteditor and delete the value inside “RhinoCodePlugin.RootPath” and if yes, how? I’m currently facing this exact same issue sadly.
For anyone facing this issue in the future, I hope this helps you out, without the need of a clean install:
Close Rhino > Navigate your way to: “C:\Users\AppData\Roaming\McNeel\Rhinoceros\8.0\Plug-ins\RhinoCodePlugin (xxx)\settings” then open the “settings-Scheme__Default.xml” file with a text editor. Remove the path find between: “” and “” did the job. Open Rhino 8 and type “ScriptEditor”, now Python will be reinstalled.
(If this doesnt work, I also removed my “.rhinocode” folder from “C:\Users”, but I expect this to work without removing the folder)
I think it might a bug where when you change the value of the rhinocode inside the Advanced settings, it just disappears from the settings.