Rhino 5 and new IronPython installations

share on google plus share on facebook share on twitter share on linkedin share via email

Rhino 5 ships with a version of IronPython (2.7.0), but we recommend updating your IronPython version to one of the newer releases, with a few caveats.

You can check your IronPython version by running this code snippet in PythonScript:

import sys
print sys.version
print sys.version_info
print sys.platform

The out of the box version of IronPython should return the following:

2.7.0 ()
(2, 7, 0, 'beta', 0)

The newest version of IronPython (v. 2.7.6 available on ironpython.net) does not work with Rhino 5 and can lead to the following errors.

If you install IronPython 2.7.6 prior to installing Rhino 5, “RhinoScript” and “PythonScript” items vanish from the top level Tools menu. Entering “EditPythonScript” at the command line will cause Rhino to crash.

If you install IronPython 2.7.6 after installing Rhino 5, Rhino 5 might not recognize it, which you can verify by checking your IronPython version as above.

IronPython 2.7.4 and 2.7.5 are both compatible with Rhino 5. You can install them, and add them to the Rhino Python module search paths below the default version of IronPython as shown in the screenshot.

Rhino Python Options


Do not remove the original module search paths. Editing the default module search paths can cause the Rhino Python editor to no longer run.

Once you’ve installed your chosen version of IronPython and appended the module search paths in Rhino, restart Rhino and rerun the IronPython version code snippet.

It should now return:

2.7.5 (IronPython 2.7.5 ( on .NET 4.0.30319.42000 (64-bit))
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)

which indicates you are now running your chosen version of IronPython!

4 Responses to “Rhino 5 and new IronPython installations”

  1. Thomas D says:

    Hi, i installed 2.7.5 as described above but Rhino 5 does still not recognize it. Any additional hints?

    • tom says:

      Make sure IronPython is on the PATH Environment Variable as well.

      Control Panel > System > Advanced System Settings > Environment Variables

      There should be a variable called ‘PATH’ or ‘Path’.
      Make sure the the IronPython folder is listed there…

  2. Sally says:

    Just a random question.

    I have been struggling to use numpy inside the IronPython environment of Rhino, but I was not successful. The link that everyone referring to (http://www.enthought.com/repo/.iron/) to install necessary files, is not working anymore, even after registering to it.

    Any suggestions on how to run numby on IronPython with 64bit Rhino?

    • tom says:

      To be honest, i have given up on getting these kind of things to work in Rhino/IronPython a long time ago. Either use alglib as your computational backend, which has a binding for DotNet (a bit more difficult to use then Numpy/Scipy but it works), or run your CPython code through an external process. At the BRG we do the latter…

Leave a response

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>