How to access numpy


#1

I am looking at using fractals in Rhino 6 and some of the Python code I like uses mgrid from numpy. Rhino 6 Python does not recognize import numpy. Is there a way to install numpy so it can be accessed by Python in Rhino 6? On stackoverflow.com I have read:

For future and for all with Windows 10 64-bit do not install Python from python.org
The easiest way for win 10 to avoid manual steps is Conda package
install Miniconda (I prefer) or Anaconda (contain Python 64 or 32bit)
in Powershell:
conda install numpy
This way you can probably get all lib and packages - Anaconda includes 125 packages. If you don’t wanna all of them Miniconda is just Python with the Conda package manager, so you install only what you need.

Is this a good approach?


#2

No, I don’t think so. Rhino uses IronPython. As far as I know, it is not compatible with numpy. Do a search on this forum and you should find some related posts…

–Mitch


#3

What’s IronPython? How can I use Numpy then? I tried to install it in my python environment but it seems not working when I use python in Rhino…Thanks!!


(Nathan 'jesterKing' Letwory) #4

IronPython is the implementarion embedded in Rhino.

This Python implementation is separate from CPython (the original implementation). NumPy isn’t a pure python module, and as such isn’t compatible with IronPython