GH Python3 Dependency Versions Behavior?

Interesting, thank you @scottd ,

So am I correct to say there are currently 5 ways to manage dependencies for the new Python3 Grasshopper Components?

1. # r: my-package-name

  • This will pip-install the listed dependency into the .rhinocode/py39-rh8/site-envs/

2. # env: path_to_an_existing/venv/lib/python3.9/site-packages

  • This will allow for loading packages from an existing virtual-environment
  • Including a # r:... after this line will still pip-install the listed dependencies into the .rhinocode/py39-rh8/site-envs/
  • To install dependencies to this existing venv, the user just needs to use the normal terminal commands outside rhino.

3. # venv: path_to_a_new/venv

  • This will create a new virtual-environment every time Grasshopper is started.
  • This venv will have a random-string suffix on the name
  • Including a # r:... after this line will pip install the listed dependencies into this new environment, rather than into the .rhinocode/...
  • This virtual-environment is not removed or cleanup when Grasshopper is exited and it is up to the user to remove any old venvs

4. Use the Install Packages Button

  • From within the Python3 Editor, click the Install Packages icon
  • This will add the packages to the .rhinocode/... environment (?)

5. Setup a custom path to an environment using the Editor Options

  • From within the Python3 Editor, go to Tools/Options/Python3 and set a custom path
  • This path may, or may not be a python venv - it is up to the user to configure

am I stating all of that correctly?

thanks!
@ed.p.may