Importing sklearn in Rhino IronPython

python2.7
rhino6
ironpython

#1

Hi,

I’ve been working on a program in Rhino which requires the sklearn module which you can import for python applications.

However, IronPython is not compatible with this module. I was wondering if there is a way to bypass IronPython and use my local version of Python instead of the one inbuilt to Rhino.

I understand there might not be a solution to this issue.

Thanks,

Jack.


(Steve Baer) #2

You can’t replace the python engine inside of Rhino with another implementation. The two are incompatible. You can always treat your installed python like another application and have your script in Rhino execute python as a child process.


#3

Another option would be to implement one of the .NET machine learning libraries instead. My colleague Mateusz has gone quite far with this (including the Owl Grasshopper plugin). I once did a quick test implementing AForge in IronPython/GHPython based on some of his VB code.


#4

You can call you external python,


#5

You can call accord.net for kmeans and import from clr.