I’m trying to use the numpy module in some scripts and I can’t figure out how to import it. I have Python3.3 installed in the normal C:\Python33\ directory and numpy is installed in C:\Python33\Lib\site-packages by default; I tried adding the C:\Python33\Lib\ directory to my search path in the python editor (because the Iron Python libs seem to have the ‘same’ search path) and when i print sys.path I get:
I’m currently looking to get started with Numpy/Scipy. It seems that this thread is the latest successful example of someone getting Numpy running in RhinoPython that I could find. I have tried following the steps provided here and keep getting stuck on step number three. Specifically the “bootstrap” bit. I have tried Goggling this without much luck.
Would you mind elaborating how you got it working? Also, did you manage to run it on 64 bit Rhino?
It turns out that the security settings on my Ironpython folder were set too high:
After fiddling with that for a while I managed to install ironpkg, Numpy and Scipy as per the instructions provided by Enthought. Afterwards I added the paths to the Numpy/Scipy folders in the “EditPythonScript” editor and enabled frames. However when I now attempt to import Numpy like so:
Runtime error (IOException): Could not add reference to assembly mtrand
I assume that this has to do with my Rhino being 64 bit and the dll dependencies being 32 bit? In which case perhaps it would be possible to use the unofficial 64 bit binaries found here instead?
I’m pretty confident this has to do with running 64bit Rhino and I have little hope that the unofficial binaries link you posted will help. I contacted enthought a while ago and they are using managed C++ to deliver their 32bit versions of numpy specifically for ironpython.
That’s unfortunate. We were hoping to implement Numpy/Scipy in a research project looking at AI, machine learning, clustering etc. It seems that many Python libraries within this field rely on Numpy for fast and efficient arrays and Scipy for additional functionality. I don’t suppose that Enthought were planning a 64 bit release for ironpython?
Either way, I would still be interested in testing out the libraries using a 32 bit version of Rhino. Would you happen to know if this version comes with the current Rhino 5 installer?