{"id":1230,"date":"2016-12-13T08:22:49","date_gmt":"2016-12-13T08:22:49","guid":{"rendered":"https:\/\/block.arch.ethz.ch\/blog\/?p=1230"},"modified":"2016-12-13T08:30:32","modified_gmt":"2016-12-13T08:30:32","slug":"rhino-5-and-new-ironpython-installations","status":"publish","type":"post","link":"https:\/\/block.arch.ethz.ch\/blog\/2016\/12\/rhino-5-and-new-ironpython-installations\/","title":{"rendered":"Rhino 5 and new IronPython installations"},"content":{"rendered":"<p>Rhino 5 ships with a version of IronPython (2.7.0), but\u00a0we recommend updating your IronPython version to one of the newer releases, with a few caveats.<\/p>\n<p><!--more--><\/p>\n<p>You can check your IronPython version by running this code snippet in PythonScript:<\/p>\n<pre>import sys\r\nprint sys.version\r\nprint sys.version_info\r\nprint sys.platform<\/pre>\n<p>The out of the box version of IronPython should return the following:<\/p>\n<pre class=\"p1\">2.7.0 ()\r\n(2, 7, 0, 'beta', 0)\r\ncli<\/pre>\n<p>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.<\/p>\n<p>If you install IronPython 2.7.6 prior to installing Rhino 5, &#8220;RhinoScript&#8221; and &#8220;PythonScript&#8221; items vanish from the top level Tools menu. Entering &#8220;EditPythonScript&#8221; at the command line will cause Rhino to crash.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1235\" src=\"https:\/\/block.arch.ethz.ch\/blog\/wp-content\/uploads\/2016\/12\/Screenshot-2016-12-13-09.19.55-1024x789.png\" alt=\"Rhino Python Options\" width=\"500\" height=\"385\" srcset=\"https:\/\/block.arch.ethz.ch\/blog\/wp-content\/uploads\/2016\/12\/Screenshot-2016-12-13-09.19.55-1024x789.png 1024w, https:\/\/block.arch.ethz.ch\/blog\/wp-content\/uploads\/2016\/12\/Screenshot-2016-12-13-09.19.55-300x231.png 300w, https:\/\/block.arch.ethz.ch\/blog\/wp-content\/uploads\/2016\/12\/Screenshot-2016-12-13-09.19.55-768x592.png 768w, https:\/\/block.arch.ethz.ch\/blog\/wp-content\/uploads\/2016\/12\/Screenshot-2016-12-13-09.19.55.png 1282w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Do not remove the original module search paths<\/strong>. Editing the default module search paths can cause the Rhino Python editor to no longer run.<\/p>\n<p>Once you&#8217;ve installed your chosen version of IronPython and appended the module search paths in Rhino, restart Rhino and rerun the IronPython version code snippet.<\/p>\n<p>It should now return:<\/p>\n<pre class=\"p1\">2.7.5 (IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (64-bit))\r\nsys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)\r\ncli<\/pre>\n<p class=\"p1\">which indicates you are now running your chosen\u00a0version of IronPython!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rhino 5 ships with a version of IronPython (2.7.0), but\u00a0we recommend updating your IronPython version to one of the newer releases, with a few caveats.<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[],"class_list":["post-1230","post","type-post","status-publish","format-standard","hentry","category-code","category-tools"],"_links":{"self":[{"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/posts\/1230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/comments?post=1230"}],"version-history":[{"count":9,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/posts\/1230\/revisions"}],"predecessor-version":[{"id":1241,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/posts\/1230\/revisions\/1241"}],"wp:attachment":[{"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/media?parent=1230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/categories?post=1230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/block.arch.ethz.ch\/blog\/wp-json\/wp\/v2\/tags?post=1230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}