Hi, I have tried to use Rhino 8 new python editor today. Very excited that we can use python 3 and more packages in rhino.
My problem is: first I want to try scipy by using
r: scipy
but it failed , below is the Rhino Code Logs:
Info 03/19/2024 13:17:44 [RhinoCode] Running process: C:\Users\Boven.rhinocode\py39-rh8\python.exe -m pip --disable-pip-version-check list --path “C:\Users\Boven.rhinocode\py39-rh8\site-envs\default-29Gmpztr” --format freeze
Info 03/19/2024 13:17:45 [RhinoCode] Installing: scipy
Info 03/19/2024 13:17:45 [RhinoCode] Running process: C:\Users\Boven.rhinocode\py39-rh8\python.exe -m pip --disable-pip-version-check install --target “C:\Users\Boven.rhinocode\py39-rh8\site-envs\default-29Gmpztr” --upgrade --no-warn-script-location --retries 0 --timeout 1 “scipy”
Error 03/19/2024 13:17:59 [RhinoCode] Process exited with code 2
Error 03/19/2024 13:17:59 [RhinoCode] Error restoring packages | System.Exception: Error installing: scipy | ERROR: Exception:
Traceback (most recent call last):
File “\?\C:\Users\Boven.rhinocode\py39-rh8\lib\site-packages\pip_internal\cli\base_command.py”, line 173, in _main
status = self.run(options, args)
File “\?\C:\Users\Boven.rhinocode\py39-rh8\lib\site-packages\pip_internal\cli\req_command.py”, line 203, in wrapper
return func(self, options, args)
File “\?\C:\Users\Boven.rhinocode\py39-rh8\lib\site-packages\pip_internal\commands\install.py”, line 446, in run
self._handle_target_dir(
File “\?\C:\Users\Boven.rhinocode\py39-rh8\lib\site-packages\pip_internal\commands\install.py”, line 501, in _handle_target_dir
shutil.rmtree(target_item_dir)
File “shutil.py”, line 749, in rmtree
File “shutil.py”, line 622, in _rmtree_unsafe
File “shutil.py”, line 627, in _rmtree_unsafe
File “shutil.py”, line 625, in _rmtree_unsafe
PermissionError: [WinError 5] Access is denied: ‘C:\Users\Boven\.rhinocode\py39-rh8\site-envs\default-29Gmpztr\numpy\core\_multiarray_tests.cp39-win_amd64.pyd’
at Rhino.Runtime.Code.Languages.PythonNet.CPythonEnviron.AddPackages(IEnumerable1 pkgSpecs) at Rhino.Runtime.Code.Environments.Environ1.Rhino.Runtime.Code.Environments.IEnviron.AddPackages(IEnumerable`1 pkgSpecs)
at Rhino.Runtime.Code.Code.RestorePackages()
at RhinoCodeEditor.Editor.Commands.WithCodeExecutableCommand.ExecuteCodeContext.RestoreCode()
Then I was wonder maybe it’s the problem with scipy, so I tried keras, because it is used as an example in the default introduction , by
r: keras
import keras
however it failed again, this time it shows as “No module names ‘optree’ in my Editor”, a screenshot is attached:
Could someone help me figure out what are these problems please?
13 posts - 3 participants
