Rhino 8 install scikit learn

I have successfully installed Pandas and Numpy in Rhino 8. However, I’m struggling with installing libraries such as scikit learn or pytorch libraries. The error seems like related to dependency conflicts… For which I was hoping the installer can handle it automatically.
Has anyone had similar issues, and what is your solution?

1 Like

Just a throught…
The python environment under .rhinocode directory doesn’t seem like a conventional python venv. What is the approach to run the environment and install the needed python packages manually instead of installing through script editor?

@yangallen3

  • The venvs inside of Rhino are basically independent paths for installing packages. The traditional venv design won’t work here since once python that is loaded inside of Rhino you can’t unload unless you restart Rhino.
  • Script editor literally uses pip install pytorch to install the package and pip will resolve dependencies. But for example if you have already installed and loaded numpy in a Rhino instance, and then pip install pytorch needs to install a different numpy version, it might fail removing the existing numpy as its binaries are already loaded in Rhino. Run “Tools > Advanced > Reset Python 3 Runtime” to reset the runtime, and install pytorch fresh.

I’m documenting these soon.

1 Like

Hi @eirannejad , thanks for the quick response. I can’t seem to find the “Tools>Advanced” let along “Reset Python 3 Runtime”. It’s late afternoon so my brain is running very slow… Can you point me to where that exactly is?

Ok, it is my brain frozen. I found it in the editor window.

1 Like

I followed your suggestion and reset the python 3 runtime, and I also removed all python modules from site-env in case of any potential conflicts.
Intalling Pytorch along is indeed successful, but It’s not with installing scikit-learn library. The error still shows dependency conflicts related to matplotlib which I believe is installed along with the scikit-learn.
THen I tried to add matplotlib along with scikit-learn, now I get other dependency conflicts.

@yangallen3 What is your package specification line look like? Would you mind sharing so I can test as well?

Yes. I’m running this in the Grasshopper Script Editor btw.
# r: scikit-learn==1.3.2

1 Like

I just ran this on a clean python 3 runtime and it worked:

# r: scikit-learn==1.3.2

import sklearn
print(sklearn)

Do you see a red status bar when running this script? Would you mind running RhinoCodeLogs and sharing the logs with me? You can easily save the contents from the Logs menu

Yes, at first I see the red band at the bottom of the editor, it says “Error restoring packages”, as the image shown.
image

And then here is the error message once I clicked in:
`Info 01/22/2024 22:12:15 [RhinoCode] Installing: scikit-learn ==1.3.2
Info 01/22/2024 22:12:15 [RhinoCode] Running process: C:\Users\xxxx.rhinocode\py39-rh8\python.exe -m pip --disable-pip-version-check install --target “C:\Users\xxxx.rhinocode\py39-rh8\site-envs\default-X_c+x5XZ” --upgrade --no-warn-script-location --retries 0 --timeout 1 “scikit-learn ==1.3.2”
Error 01/22/2024 22:12:53 [RhinoCode] Process exited with code 2
Error 01/22/2024 22:12:53 [RhinoCode] Error restoring packages | System.Exception: Error installing: scikit-learn ==1.3.2 | ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
matplotlib 3.7.1 requires fonttools>=4.22.0, which is not installed.
matplotlib 3.7.1 requires importlib-resources>=3.2.0; python_version < “3.10”, which is not installed.
matplotlib 3.7.1 requires kiwisolver>=1.0.1, which is not installed.
matplotlib 3.7.1 requires pyparsing>=2.3.1, which is not installed.
matplotlib 3.7.1 requires python-dateutil>=2.7, which is not installed.
altair 4.2.2 requires pandas>=0.18, which is not installed.
altair 4.2.2 requires toolz, which is not installed.
ERROR: Exception:
Traceback (most recent call last):
File “\?\C:\Users\xxxx.rhinocode\py39-rh8\lib\site-packages\pip_internal\cli\base_command.py”, line 173, in _main
status = self.run(options, args)
File “\?\C:\Users\xxxx.rhinocode\py39-rh8\lib\site-packages\pip_internal\cli\req_command.py”, line 203, in wrapper
return func(self, options, args)
File “\?\C:\Users\xxxx.rhinocode\py39-rh8\lib\site-packages\pip_internal\commands\install.py”, line 446, in run
self._handle_target_dir(
File “\?\C:\Users\xxxx.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\xxxx\.rhinocode\py39-rh8\site-envs\default-X_c+x5XZ\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(IEnumerable1 pkgSpecs) at Rhino.Runtime.Code.Code.RestorePackages() at RhinoCodeEditor.Editor.Commands.WithCodeExecutableCommand.ExecuteCodeContext.RestoreCode()

This line is pip trying to delete the .pyd file in an exsiting installation of numpy but fails because it is already loaded in Rhino. Did you run this on a fresh python 3 runtime with no environments?

Hmm… I didn’t set up any environment for running this python editor, i thought the script editor would use the environment from one of the site-envs in the .rhinocode directory, although I did reset python 3 in Rhino prior to this run.

I do have a globally installed Numpy on my machine, not installed in any virtual environment, not sure if this would cause any problems while rhino is trying to load or remove Numpy.

It should not. Delete ~/.rhinocode/py39-rh8\site-envs\default-X_c+x5XZ and install again. Rhino should be closed.

Thank you, Ehsan, for your detailed guidance! Following your steps, I managed to resolve the issue. Here’s what I did:

  1. I reset the Python runtime.
  2. Closed Rhino to ensure no conflicts with packages currently in use.
  3. Removed the auto-generated environment.

This time I installed only Scikit-learn without adding any other packages initially.

Your analysis was spot on. The root cause of the error was due to having Matplotlib installed before Scikit-learn. Since Matplotlib also depends on NumPy, and Scikit-learn was trying to modify the NumPy installation, a conflict occurred.

By scratching off the line that installs Matplotlib ( # r: matplotlib), I successfully avoided the conflict and installed Scikit-learn without any issues.

4 Likes

Sweet :smiley: Thanks for the test and feedback. Jus so you know, I have a ticket to create a Rhino backend for matplotlib so plots can open in Eto windows in Rhino:

RH-74046 CPython matplotlib needs a Rhino/Eto backend probably (affects pandas)

2 Likes

@eirannejad Hi,

am also trying to install sklearn, but am still getting errors.

RhinoCode logs:

Info 12/05/2024 03:41:13 [RhinoCode] Storage Site Registered: Local Drive (mcneel.eto.file)
Info 12/05/2024 03:41:13 [RhinoCode] Storage Site Registered: Rhino Files (mcneel.rhinoFiles.file)
Info 12/05/2024 03:41:13 [RhinoCode] Storage Site Registered: Web (mcneel.console.http)
Info 12/05/2024 03:41:13 [RhinoCode] Rhino3D Initialized on Windows - NETCoreApp
Info 12/05/2024 03:41:13 [RhinoCode] Platform Registered: Rhinoceros 3D @ 8.13.24317.13001 (mcneel.rhino3d.rhino)
Info 12/05/2024 03:41:13 [RhinoCode] Storage Site Registered: Rhino3D Project (mcneel.rhino3d.project)
Info 12/05/2024 03:41:13 [RhinoCode] Operating System: Microsoft Windows NT 10.0.22631.0
Info 12/05/2024 03:41:13 [RhinoCode] RhinoCode server starting on \\.\pipe\rhinocode_remotepipe_39416
Info 12/05/2024 03:41:27 [RhinoCode] Language Registered: Plain Text 1.0 (rhinocode.builtin.text)
Info 12/05/2024 03:41:27 [RhinoCode] Language Registered: JSON 1.0 (rhinocode.builtin.json)
Info 12/05/2024 03:41:27 [RhinoCode] Language Registered: Yaml 1.0 (rhinocode.builtin.yaml)
Info 12/05/2024 03:41:27 [RhinoCode] Language Registered: Git DotFile 1.0 (rhinocode.builtin.gitDotFile)
Info 12/05/2024 03:41:27 [RhinoCode] Language Loader Registered: mcneel.pythonnet.python@3.*
Info 12/05/2024 03:41:27 [RhinoCode] Language Loader Registered: mcneel.ironpython.python@2.*
Info 12/05/2024 03:41:27 [RhinoCode] Language Loader Registered: mcneel.roslyn.csharp@9.*
Info 12/05/2024 03:41:27 [RhinoCode] Language Loader Registered: mcneel.gh1.grasshopper@1.*
Info 12/05/2024 03:41:27 [RhinoCode] Language Loader Registered: mcneel.markdig.markdown@0.*
Info 12/05/2024 03:41:27 [RhinoCode] Language Registered: C# 9.0 (mcneel.roslyn.csharp)
Info 12/05/2024 03:41:27 [RhinoCode] Using existing runtime: CPython 3.9.10/43 (x64)
Info 12/05/2024 03:41:27 [RhinoCode] Initializing CPython 3.9.10/43 runtime
Info 12/05/2024 03:41:27 [RhinoCode] Deploying python packages
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "site-interop.zip"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "utils.zip"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "pylint-2.10.2-py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "pyflakes-2.4.0-py2.py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "pycodestyle-2.8.0-py2.py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "jedi-0.19.2-py2.py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "black-21.8b0-py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "certifi-2024.8.30-py3-none-any.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "pywin32-302-cp39-cp39-win_amd64.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Deploying package from "psutil-5.9.1-cp39-cp39-win_amd64.whl"
Info 12/05/2024 03:41:27 [RhinoCode] Saving CPython runtime configs
Info 12/05/2024 03:41:27 [RhinoCode] PYTHONHOME: \\?\C:\Users\VIJESH\.rhinocode\py39-rh8
Info 12/05/2024 03:41:27 [RhinoCode] PYTHONPATH: 
Info 12/05/2024 03:41:27 [RhinoCode] Loading CPython engine from C:\Users\VIJESH\.rhinocode\py39-rh8\McNeel.Python39.Runtime.dll
Info 12/05/2024 03:41:29 [RhinoCode] Preparing python locales
Info 12/05/2024 03:41:29 [RhinoCode] Python default locale is 'en_IN.cp1252'
Info 12/05/2024 03:41:29 [RhinoCode] Python current locale is 'English_India.1252'
Info 12/05/2024 03:41:29 [RhinoCode] Preparing SSL context
Info 12/05/2024 03:41:29 [RhinoCode] Adding search path C:\Users\VIJESH\.rhinocode\py39-rh8\lib\site-packages (from C:\Users\VIJESH\.rhinocode\py39-rh8\lib\site-packages\distutils-precedence.pth)
Info 12/05/2024 03:41:29 [RhinoCode] Adding search path C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\win32 (from C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\pywin32.pth)
Info 12/05/2024 03:41:29 [RhinoCode] Adding search path C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\win32\lib (from C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\pywin32.pth)
Info 12/05/2024 03:41:29 [RhinoCode] Adding search path C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\Pythonwin (from C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\pywin32.pth)
Info 12/05/2024 03:41:29 [RhinoCode] Adding search path C:\Users\VIJESH\.rhinocode\py39-rh8\site-support (from C:\Users\VIJESH\.rhinocode\py39-rh8\site-support\pywin32.pth)
Info 12/05/2024 03:41:29 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check list --path "C:\Users\VIJESH\.rhinocode\py39-rh8\site-envs\default-10yTr3pA" --format freeze
Info 12/05/2024 03:41:29 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check list --format freeze
Info 12/05/2024 03:41:29 [RhinoCode] Building stubs for platform "Rhinoceros 3D @ 8.13.24317.13001 (mcneel.rhino3d.rhino)" references
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for RhinoCodePlatform.Rhino3D, Version=8.13.24317.13001
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading.Tasks.Parallel, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Windows.Forms, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Drawing.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Drawing.Common, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Eto, Version=2.8.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Eto, Version=2.8.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for RhinoCommon, Version=8.13.24317.13001
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Rhino.UI, Version=8.13.24317.13001
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Grasshopper, Version=8.13.24317.13001
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for GH_IO, Version=8.13.24317.13001
Info 12/05/2024 03:41:29 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check list --path "C:\Users\VIJESH\.rhinocode\py39-rh8\site-support" --format freeze
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.CoreLib, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.InteropServices, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Text.Encoding.CodePages, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Loader, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Collections, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Collections.Concurrent, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for mscorlib, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.Win32.SystemEvents, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.TraceSource, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Drawing, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Drawing.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xaml, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.Uri, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Drawing.Common, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Extensions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.Debug, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.CompilerServices.VisualC, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.Win32.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Collections.NonGeneric, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ObjectModel, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Windows.Forms, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading.Thread, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Windows.Forms.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Collections.Specialized, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Configuration.ConfigurationManager, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.Process, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Memory, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml.ReaderWriter, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.Xml, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.WebClient, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel.EventBasedAsync, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Text.Encoding.Extensions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel.TypeConverter, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.Win32.Registry, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Linq, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Collections.Immutable, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.FileSystem.Watcher, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading.Overlapped, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Linq.Expressions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.Packaging, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Requests, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.WebHeaderCollection, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading.ThreadPool, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Windows.Extensions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Core, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Text.RegularExpressions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.Emit.Lightweight, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.Emit.ILGeneration, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Numerics.Vectors, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.StackTrace, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Serialization, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Serialization.Xml, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.DataContractSerialization, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.Metadata, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Cryptography, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml.XmlSerializer, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Serialization.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Serialization.Formatters, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Numerics, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Numerics, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Data, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Data.Common, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.MemoryMappedFiles, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.Pipes, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.AccessControl, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Principal.Windows, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Cryptography.ProtectedData, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.FileVersionInfo, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.NetworkInformation, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Management, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Http, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.Tracing, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.WebProxy, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.DiagnosticSource, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Security, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.ServicePoint, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Quic, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Sockets, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.NameResolution, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Claims, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Web, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Web.HttpUtility, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.VisualBasic, Version=10.1.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.VisualBasic.Core, Version=12.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Resources.Extensions, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Windows.Controls.Ribbon, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Text.Json, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Cryptography.Algorithms, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.Compression, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel.DataAnnotations, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ComponentModel.Annotations, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.Data, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.Core, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.DataView, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.LightGbm, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.Scripting, Version=1.3.1.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.CodeDom, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.Dynamic, Version=1.3.1.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Resources.ResourceManager, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.FileSystem, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.InteropServices.RuntimeInformation, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Console, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.Contracts, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.TextWriterTraceListener, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.Compression.Brotli, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.Compression.ZipFile, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.FileSystem.DriveInfo, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.IO.IsolatedStorage, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Linq.Queryable, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Linq.Parallel, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.HttpListener, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Mail, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.Ping, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.WebSockets.Client, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Net.WebSockets, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.DispatchProxy, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Reflection.Emit, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Resources.Writer, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Serialization.Json, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Threading.Tasks.Parallel, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Transactions.Local, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml.XDocument, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.Xml.Linq, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml.XPath.XDocument, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Xml.XPath, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.CSharp, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.VisualBasic.Forms, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Cryptography.Primitives, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Security.Cryptography.X509Certificates, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.CodeAnalysis.CSharp, Version=4.6.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Text.Encodings.Web, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Runtime.Intrinsics, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ServiceModel, Version=4.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.ServiceModel.Primitives, Version=4.9.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Private.ServiceModel, Version=4.9.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.CodeAnalysis.VisualBasic, Version=4.6.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.CodeAnalysis, Version=4.6.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.FastTree, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for Microsoft.ML.StandardTrainers, Version=1.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Stubs already exist for System.Diagnostics.Tools, Version=7.0.0.0
Info 12/05/2024 03:41:29 [RhinoCode] Starting python language server background process
Info 12/05/2024 03:41:29 [RhinoCode] Running background process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe utils\pyminilsp_server.py
Info 12/05/2024 03:41:29 [RhinoCode] Added Python 3.9.10 (mcneel.pythonnet.python) search path: C:\Users\VIJESH\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 12/05/2024 03:41:29 [RhinoCode] Language Registered: Python 3.9.10 (mcneel.pythonnet.python)
Info 12/05/2024 03:41:29 [RhinoCode] Preparing python auto-completion cache
Info 12/05/2024 03:41:34 [RhinoCode] Stubs already exist for System.Runtime.CompilerServices.Unsafe, Version=7.0.0.0
Info 12/05/2024 03:41:35 [RhinoCode] Stubs already exist for System.Globalization, Version=7.0.0.0
Info 05-12-2024 03:41:51 [RhinoCode] Stubs already exist for System.Runtime.Caching, Version=4.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Using existing runtime: IronPython 2.7.12/3 (x64)
Info 12/05/2024 03:42:05 [RhinoCode] Loading IronPython 2.7.12/3 runtime
Info 12/05/2024 03:42:05 [RhinoCode] Stubs already exist for System.IO.Compression.FileSystem, Version=4.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Added IronPython 2.7.12 (mcneel.ironpython.python) search path: C:\Users\VIJESH\AppData\Roaming\McNeel\Rhinoceros\8.0\scripts
Info 12/05/2024 03:42:05 [RhinoCode] Building stubs for System.Diagnostics.PerformanceCounter, Version=7.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Stubs already exist for System.Diagnostics.EventLog, Version=7.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Building stubs for System.Security.Permissions, Version=7.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Building stubs for System.IO.Ports, Version=7.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Building stubs for System.Threading.AccessControl, Version=7.0.0.0
Info 12/05/2024 03:42:05 [RhinoCode] Language Registered: IronPython 2.7.12 (mcneel.ironpython.python)
Info 12/05/2024 03:42:05 [RhinoCode] Language Registered: Grasshopper 1.0 (mcneel.gh1.grasshopper)
Info 12/05/2024 03:42:05 [RhinoCode] Language Registered: Markdown 0.30.4 (mcneel.markdig.markdown)
Info 12/05/2024 03:42:05 [RhinoCode] Parsing component schema "https://files.mcneel.com/schemas/rhinocode/component.schema.v1.json" in C:\Users\VIJESH\.rhinocode\component.json
Info 12/05/2024 03:42:12 [RhinoCode] Begin editing S (983a75d4-fb7c-4947-8d05-7ee93c865aad)
Info 12/05/2024 03:42:12 [RhinoCode] Parsing configs schema "https://files.mcneel.com/schemas/rhinocode/editor.schema.v1.json" in C:\Users\VIJESH\.rhinocode\editor.json
Info 12/05/2024 03:42:13 [RhinoCode] Stubs already exist for System.Xml.Linq, Version=4.0.0.0
Info 12/05/2024 03:42:29 [RhinoCode] Begin editing Py3 (6be4ee12-9fe3-430f-b7a0-1c00be357bfb)
Info 12/05/2024 03:43:00 [RhinoCode] Installing "numpy"
Info 12/05/2024 03:43:00 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check install --target "C:\Users\VIJESH\.rhinocode\py39-rh8\site-envs\default-10yTr3pA" --progress-bar off --upgrade --no-warn-script-location --retries 0 --timeout 1 "numpy"
Info 12/05/2024 03:43:05 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check list --path "C:\Users\VIJESH\.rhinocode\py39-rh8\site-envs\default-10yTr3pA" --format freeze
Info 12/05/2024 03:43:06 [RhinoCode] Collecting numpy
  Using cached numpy-2.0.2-cp39-cp39-win_amd64.whl.metadata (59 kB)
Using cached numpy-2.0.2-cp39-cp39-win_amd64.whl (15.9 MB)
Installing collected packages: numpy
Successfully installed numpy-2.0.2

Info 12/05/2024 03:43:56 [RhinoCode] Installing "sklearn"
Info 12/05/2024 03:43:56 [RhinoCode] Running process: C:\Users\VIJESH\.rhinocode\py39-rh8\python.exe -I -m pip --isolated --disable-pip-version-check install --target "C:\Users\VIJESH\.rhinocode\py39-rh8\site-envs\default-10yTr3pA" --progress-bar off --upgrade --no-warn-script-location --retries 0 --timeout 1 "sklearn"
Error 12/05/2024 03:43:57 [RhinoCode] Process exited with code 1
Error 12/05/2024 03:43:57 [RhinoCode] pip install error | Collecting sklearn
  Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error
  
  python setup.py egg_info did not run successfully.
  exit code: 1
  
  [15 lines of output]
  The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
  rather than 'sklearn' for pip commands.
  
  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
  
  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Thanks
Vijesh

Thanks. I tried removing the environment, as suggested, and now it’s working. There were many dependency issues. Thanks again.

1 Like

HI @yangallen3 @eirannejad @vijesh
May I ask how to removed the auto-generated environment ?

@ctu6 You can reset python 3 runtime and that removes all environments and installed packages

1 Like

@eirannejad thanks!

1 Like