Right now I am working on a mac version of Tunny, a multi-objective optimization tool.
It has already reached the stage where it works as follows, but there is one problem.
Tunny is running Python behind the scenes and the windows version uses Embeddable Python. However, there is no mac version.
So now it works in only my Python environment. This makes it difficult to distribute.
RhinoCode downloads Python3 and automatically embeds the Python file in /.rhinocode/py39-rh8.
Does anyone know how this is done?
By “Embeddable Python” are you compiling Python yourself in Visual Studio? Not using RhinoPython, or either Python component in Grasshopper?
The .rhinocode directory appears similar to the CPython embedded in Rhino 8. There’s probably been two years of work by the McNeel team to integrate Python 3.9. But I believe under the hood it uses PythonNet.
Oh wow, that’s impressive, and advanced. Is there so much being sent from Tunny’s C# to Optuna, that it’s too much for native Grasshopper connections that the user should connect together to a Python component?
I’ve only called out to an external Python that the user has installed, but I haven’t tested the external application on MacOS.
Tunny has confirmed that it works with Python in Rhino >= 8.
Python is connected to Grasshoper via Pythonnet, which is used to perform Galapagos-like optimizations using Python’s optimization library.
I was worried about conflicts with other packages in the existing RhinoCode, but your following article made me think that creating a site-envs folder for Tunny would not be a problem.