Hi! Is it possible to use virtual environment with python in rhino8?
Not at the moment. The problem is that we are running in a Rhino process so can not load multiple python 3 versions. Supporting separate envs to install pip packages is also a little tricky. For example numpy
uses c-libraries that when they are loaded, they can’t be unloaded. So you can’t really install a specific numpy version in one env and another version in another env and have them both successfully work inside Rhino.
I’m looking at options to improve this continously.
sorry, my question is perhaps a little stupid, but is it possible to indicate at the start of a script to use this or that library folder?
Franck.
The standard way is to add the path where your libraries are to sys.path
In the next build I have added something to make this simpler byt adding # env: path/to/env
to the top of the script.
Are you both referring to python scripting in Rhino or also to the python components in Grasshopper?
@eirannejad is the next build a matter of days or weeks?
I’m asking because having cpython with conda envs in Grasshopper would be a gamechanger for our plugin project.
Another Beta was released yesterday
That’s what I seemed to have read… but I understood that it was rather complicated to set up, it seemed rather simple to me.
Franck