Python & Visual Studio Code Documentation

Hello, I am trying in vain to configure Visual Studio Code to write Python scripts (v7). According to this forum, it seems that it is enough to create a Python environment and install Rhino-stubs.

The entire “rhinosyntax” namespace is not found, nor is the “.NET/IronPython” one, and all the sub-namespaces of “Rhino” (such as Rhino.Collection, Rhino.Geometry) are not found either. In the official documentation on the site, I found no explanation for Visual Studio Code.

Is there a complete and up-to-date explanation somewhere for Rhino 7 to configure Python & VSCode? Thank you, jmv

1 Like

maybe @eirannejad ?

From @eirannejad’s video’s video:

  • add to .vscode/settings/python.analysis.extraPaths (double check the paths in the video):
    • ~/.rhinocode/site-interop
    • ~/.rhinocode/site-rhinopython
    • ~/.rhinocode/site-stubs

There might be a couple more paths mentioned, I just quickly glanced at my old notes from when I was wondering the same thing.

Thank you for taking the time to respond.
Unfortunately, although I was able to find the corresponding folders in Windows, their internal structure is very different from the video.
I tried adding different paths but nothing worked.

@kitjmv This is how the directories are structured.

Add these two paths to get rhinoscriptsyntax and ghpythonlib

Rhino_SIO5KNj4Ug

Add the path to the stubs for the rhino you are running to get the dotnet libraries:

Rhino_fBEH09h1sQ

1 Like

Merci @eirannejad !!

1 Like