# RunPythonScript not using ipy64.exe with Rhino 64-bit

**URL:** <https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186>\
**Category:** Scripting\
**Tags:** rhino, rhinopython, rhino5\
**Created:** [June 21, 2017, 2:50pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186 "2017-06-21T14:50:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Clero](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathan_clero/32/541078_2.png) [@Nathan\_Clero](https://discourse.mcneel.com/u/Nathan_Clero)\
**Post date:** [June 21, 2017, 2:50pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/1 "2017-06-21T14:50:06Z")

</div>

Hi everyone,

I wrote a first script ([RunScript.py](http://RunScript.py)) calling a DLL that runs in IPython to be Rhino compliant. To test it I used ipy.exe and it worked well (it enters and read the DLL). Same when running the script with Rhino 64-bit.

When adapting and testing my script to another DLL, it didn’t work with ipy.exe nor with Rhino 64-bit, but it worked with ipy64.exe (indeed the library was compiled in 64.

Does it means that the command RunPythonScript launched in Rhino 64-bit is not using ipy64.exe but ipy.exe?

Best regards,  
Nathan

---

<div class="post-metadata">

**Author:** ![piac](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piac/32/769366_2.png) [@piac](https://discourse.mcneel.com/u/piac)\
**Post date:** [June 22, 2017, 11:00am UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/2 "2017-06-22T11:00:56Z")

</div>

Hi @Nathan_Clero

Rhino does not use either of the .exe’s, but uses the implemenation of IronPython that in turn those programs use. If you are more specific regarding the error, maybe we could assist further.

## Giulio

Giulio Piacentino  
for Robert McNeel & Associates  
[giulio@mcneel.com](mailto:giulio@mcneel.com)

---

<div class="post-metadata">

**Author:** ![Nathan\_Clero](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathan_clero/32/541078_2.png) [@Nathan\_Clero](https://discourse.mcneel.com/u/Nathan_Clero)\
**Post date:** [June 22, 2017, 12:19pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/4 "2017-06-22T12:19:19Z")

</div>

Hey @piac

Does it help?

 ![](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/1/71561da74d99d563390de72bfc4008c6a7351c80.PNG)

Thanks a lot for the help!

Nathan

---

<div class="post-metadata">

**Author:** ![piac](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piac/32/769366_2.png) [@piac](https://discourse.mcneel.com/u/piac)\
**Post date:** [June 22, 2017, 1:34pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/5 "2017-06-22T13:34:06Z")

</div>

Hi again @Nathan_Clero. The reasons why it could not add references can be multiple.

One, which is the simplest one, would be that the path to the assembly is unknown. Try using AddReferenceToFileAndPath() or another of the alternatives to see if the problem persists.

Also, ipy.exe is not a product of Robert McNeel & Associates.

## Giulio

Giulio Piacentino  
for Robert McNeel & Associates  
[giulio@mcneel.com](mailto:giulio@mcneel.com)

---

<div class="post-metadata">

**Author:** ![Nathan\_Clero](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathan_clero/32/541078_2.png) [@Nathan\_Clero](https://discourse.mcneel.com/u/Nathan_Clero)\
**Post date:** [June 22, 2017, 4:00pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/6 "2017-06-22T16:00:47Z")

</div>

Hi @piac,

Unfortunately AddReferenceToFileAndPath didn’t work … And AddReference worked before with ipy64.exe so I guess the AddReference is enough.

It seems that Rhino is using IronPython 32-bit, can you confirm that?

Nathan

---

<div class="post-metadata">

**Author:** ![stevebaer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/stevebaer/32/473567_2.png) [@stevebaer](https://discourse.mcneel.com/u/stevebaer)\
**Post date:** [June 22, 2017, 4:07pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/7 "2017-06-22T16:07:15Z")

</div>

> [@Nathan\_Clero](#):
>
> It seems that Rhino is using IronPython 32-bit, can you confirm that?

IronPython runs embedded in the Rhino process so if you are running Rhino 32 bit, then IronPython will be executing as 32 bit. If you are running the 64 bit version of Rhino, then IronPython will be executing as 64 bit.

---

<div class="post-metadata">

**Author:** ![Nathan\_Clero](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathan_clero/32/541078_2.png) [@Nathan\_Clero](https://discourse.mcneel.com/u/Nathan_Clero)\
**Post date:** [June 22, 2017, 5:12pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/8 "2017-06-22T17:12:58Z")

</div>

Hi @stevebaer,

Mmmmmh I will check that again but it didn’t seem to work like that because it worked with ipy64.exe but not with Rhino 64-bit for me … 😕

Unless this is a bug, maybe I am not fully understanding the problem.

100% sure about IronPython running with the same architecture as Rhino? (I am secretly hoping that there is a trick 😁)

Nathan

---

<div class="post-metadata">

**Author:** ![stevebaer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/stevebaer/32/473567_2.png) [@stevebaer](https://discourse.mcneel.com/u/stevebaer)\
**Post date:** [June 22, 2017, 5:19pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/9 "2017-06-22T17:19:21Z")

</div>

> [@Nathan\_Clero](#):
>
> 100% sure about IronPython running with the same architecture as Rhino?

101% sure even. Operating systems don’t allow a single process to have different bit flavors for different parts.

---

<div class="post-metadata">

**Author:** ![stevebaer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/stevebaer/32/473567_2.png) [@stevebaer](https://discourse.mcneel.com/u/stevebaer)\
**Post date:** [June 22, 2017, 5:34pm UTC](https://discourse.mcneel.com/t/runpythonscript-not-using-ipy64-exe-with-rhino-64-bit/45186/10 "2017-06-22T17:34:46Z")

</div>

Sharing your script may give us a clue as to what is going wrong
