Uninstall Python Packages from Rhino 8

Using #requirements: packagename is a great and simple way to install a Python package with a single line of code from inside the Python 3 Script Component from Grasshopper.
However, what is the correct and perhaps equally intuitive way to uninstall a package installed in this way?

1 Like

Create a venv with #env: and some folder. Install packagename or -r requirements.txt into the venv instead of the global Python. To uninstall, delete the venv’s folder.

To uninstall from the global Python, I think it’s necessary to open a command line prompt and run its python.exe with -m pip uninstall packagename or pip.exe uninstall packagename. Track down the transitive deps too.

1 Like

Currently resetting the runtime (Tools → Advanced → Reset Python 3 Runtime) is the most effective way of clearing all installed packages and environments.

I have made a good amount of improvements in environment handling in Rhino WIP

1 Like