algorithmic modeling for Rhino

Hi everybody!

I know that the question was already asked but I still struggle with the installation of numpy / scipy on ironpython. 

So if anybody have a tips to make it works it would be nice. :)

A tried a lot already but I cannot figure out the problem on step 4.  I did every steps describe there : and also there : (You should have an account to connect there.)

So I get an error of IO I think, in step 4. It is describe here : (>>> )

1.) IronPython

Download and install IronPython 2.7, this will require .NET v4.0.

2.) Modify PATH

Add the install location on the path, this is usually: C:\Program File\IronPython 2.7

But on 64-bit Windows systems it is: C:\Program File (x86)\IronPython 2.7

As a check, open a Windows command prompt and go to a directory (which is not the above) and type:

> ipy -V PythonContext on .NET 4.0.30319.225 

3.) ironpkg

Bootstrap ironpkg, which is a package install manager for binary (egg based) Python packages. Download and type:

> ipy --install 

Now the ironpkg command should be available:

> ironpkg -h (some useful help text is displayed here) 

4.) scipy

Installing scipy is now easy:

> ironpkg scipy 

Any tips would be nice.  Thank's.


Views: 19451

Replies to This Discussion

I would like to just use one of these prepared binaries, actually:

...which use bizarre "wheel" format installers, needing Pip, which in catch-22 fashion is itself packaged as a .whl file:

...but I have no idea how to point it towards IronPython or the Rhino Python plugin, nor initially even how to install Pip since the instructions ( ) fail using IronPython as "ipy python" which gives an error:

Traceback (most recent call last):

File "", line 17759, in <module>

File "", line 156, in main

File "", line 74, in b85decode

TypeError: sequence item 0: expected bytes or byte array, str found

The author of a book on IronPython eventually rejected the Enthought versions of Numpy/Scipy:

The real issue is Rhino still using obsolete 2.7 IronPython instead of the latest Python 3.x. Can I use my own Python editor to control Rhino via Rhinocommon? I'd sure like to also swim around in Grasshopper Python with the advanced math libraries, but the installation is only becoming more broken over time, not less, it seems, and no clients will ever be able to follow these convoluted hacks to do an install.

Related caveats are here:

Initial excitement about the Enthought package is here:

Learning that wheel archives are merely zip files, changing the extension to zip let me move the numpy folder into the Rhino IronPython plugin folder, in C:\Program Files\Rhinoceros 5.0 (64-bit)\Plug-ins\IronPython\Lib\site-packages, then include that search path in the EditPythonScript editor options, but upon importing numpy I get the same multiarray error mentioned by other users before, and even just importing some part of numpy gives the same error:

Granted, I used the numpy‑1.10.0+mkl‑cp35‑none‑win32.whl which is 32 bit, on my 64 bit Rhino installation. Trying numpy‑1.10.0+mkl‑cp35‑none‑win_amd64.whl despite my Intel instead of AMD processor gives the same error.

Google has many hits for: IronPython multiarray.

You're a lifesaver! Thanks!!

Many thanks to both of you. Have a good day. 

Hello everyone,

Has anyone gotten scipy to work on Rhino/Gh?

I also seem to be missing a bunch of modules from both numpy and scipy. My numpy directory in Anaconda is around 90MB, but my numpy directory in Ironpython is 4MB. Scipy in Anaconda is 300MB but in Ironpython it's < 3MB. 

I'm pretty sure that's the reason I can't get scipy to import. 

Thank you!

Hi Jesus,

I'm not sure what is causing your import error. However, regarding why the size of scipy in Anaconda is larger than scipy for IronPython -- my understanding is that scipy and numpy contain many packages that are actually wrappers for C and even FORTRAN code and these modules have not been ported over to C# for use in .NET.

Good luck with the import bug!


I'm pretty sure the import error is due to missing modules.

About your hypothesis, your basically saying that what is missing is because it cannot run in IronPython only in standard Python?

For those curious here is a comparison between scipy and numpy in Anaconda vs Ironpython.

Sorry for late reply.  

I had a same error... This post would be a solution.

Now I'm wondering how to access Rhinocommon and thus Rhino from outside of the IronPython editors in Rhino or Grasshopper, hinted at here:

That way I could use independent Python 3.5 after installing Numpy/Scipy in the normal way, yet still control Rhino and even access Grasshopper components.

Is this possible?

You can sort of use the commercial PyCharm editor but alas it seems you must still use IronPython as the interpreter so it doesn't solve the Numpy/Scipy library problems:

IronPython 3 was in development, but the whole blog hasn't been updated since 2013 either:

So how do I install Rhinocommon etc. for use with a normal Python 3.x interpreter? This video shows a standard non-IronPython 2.7.3 interpreter evidently being used within the PyCharm editor:






  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service