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)
cli

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 (2.7.5.0) on .NET 4.0.30319.42000 (64-bit))
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
cli

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

2 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?
    Thanks!

    • 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…

Leave a Reply to tom

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>