algorithmic modeling for Rhino
Hi everybody!
I know that the question was already asked but I still struggle with the installation of numpy / scipy on ironpython.
So if anybody have a tips to make it works it would be nice. :)
A tried a lot already but I cannot figure out the problem on step 4. I did every steps describe there :https://stevebaer.wordpress.com/2011/06/27/numpy-and-scipy-in-rhino... and also there : https://store.enthought.com/repo/.iron/ (You should have an account to connect there.)
So I get an error of IO I think, in step 4. It is describe here : (>>> http://community.sharpdevelop.net/forums/t/16072.aspx )
Download and install IronPython 2.7, this will require .NET v4.0.
Add the install location on the path, this is usually: C:\Program File\IronPython 2.7
But on 64-bit Windows systems it is: C:\Program File (x86)\IronPython 2.7
As a check, open a Windows command prompt and go to a directory (which is not the above) and type:
> ipy -V PythonContext 2.7.0.40 on .NET 4.0.30319.225
Bootstrap ironpkg, which is a package install manager for binary (egg based) Python packages. Download ironpkg-1.0.0.py and type:
> ipy ironpkg-1.0.0.py --install
Now the ironpkg command should be available:
> ironpkg -h (some useful help text is displayed here)
Installing scipy is now easy:
> ironpkg scipy
Any tips would be nice. Thank's.
Tristan
Tags:
I was wrong, and on closer viewing of the video, he does switch to the same old IronPython interpreter:
Thus I must conclude that it's a many month or even year waiting game for Rhino/Grasshopper itself to update to Rhino 6/Grasshopper 2 and then possibly also a new Python update on top of that. Even if I could get it to install right, and then work too, no client would ever be able to follow the crazy directions. Numpy/Scipy were merely to be a feather in my cap anyway, since I can just do things with native Python code. Doing without Rhinoscript in favor of pure Rhinocommon vastly simplified my outlook, early on, and now pure Python is my second frugality update, but I'm still interested in using Grasshopper components as a library since that's where the Rhino development action is at these days, including this forum being a huge resource.
IronPython is pathetic abandonware. Please get rid of it, McNeel, and make your system work with normal Python, period. And also include Numpy/Scipy and any other core libraries normal users would use a lot, so normal clients don't have to do convoluted installations that are deal killers since they will usually fail.
While I understand and share the frustration, the whole reason to use IronPython in Rhino in the first place is that it is a .NET language written entirely in C# (enabling us to interact with RhinoCommon etc.). So getting rid of it does not really seem like a solution. Perhaps there could be some clever approaches to run CPython within Rhino/GH in addition to IronPython. Enabling us to implement whichever Python module we might see fit AND get all the sweet functionality of .NET. One can dream :)
That would indeed be great. But saying "any popular library" is a bit of slippery slope, no. I mean where would McNeel draw the line and who should be responsible for implementing/testing etc.? It's a tricky situation that doesn't seem to have a straightforward solution as far as I can gather. To make it even worse, what happens once Rhino is exclusively 64 bit (which it will be soon with Rhino 6) and Enthought (or someone else) has not made Numpy/Scipy available for 64 bit Windows!? Dependencies can be a real headache :/
PS. C# is actually younger than Python and is arguably a simpler/cleaner language to implement on Windows as it is inherently tied to .NET.
PPS. Which lower level language ("A") a higher level language ("B") is written in matters in that it determines how easy it is to fiddle with "A" types/data-structures from "B".
Seconding this. Python is already the language of choice for data science / machine-learning (I'm coming to this thread trying to install the scikit-learn library), and not having numpy/scipy is kind of crippling.
To have Numpy and Scipy (and Matplotlib) would be immensely helpful to in pushing forward experiments with ML & architecture.
Here is a good page that shows what Numpy contains, and a non-IronPython effort called PyPy, to port Numpy to Python:
Ironclad was an attempt to make Numpy work with IronPython, but it too is abandonware on life support:
Ironclad’s purpose is to allow IronPython to transparently import and use compiled CPython extensions.
The original project https://code.google.com/p/ironclad is no longer active. The last known version works with Python 2.6. The idea here is to make it work with current version (2.7.x) of CPython and IronPython.
At the moment it does compile using up to date components and passes almost all internal tests.
Ran 479 tests in 135.893s FAILED (failures=2) scons: done building targets.
numpy is still failing on import.
https://github.com/IronLanguages/ironclad
http://www.johndcook.com/blog/2009/03/19/ironclad-ironpytho/
"The purpose of Ironclad is to allow you to use Python C extensions (of which there are many) from inside IronPython without recompiling anything. The secret purpose has always been to get NumPy working in Resolver One, and in release 1.4 we finally achieved this goal. Although the integration is still alpha level...."
What a long story this installation...
Nik Willmore (or anyone) if you finally managed to install numpy for grashopper python, please let me know how to do it. I'm interested in solving simple linear systems of equations and I think Grasshopper math library cannot do, can it?
Thanks!
I'll try again one of these days, but so far no, I only got it to work in an the independent install of IronPython, got excited about it, but then when I pointed the Rhino EditPythonScript editor via options to the correct directories of the IronPython installation, it failed to work within Rhino and thus within Grasshopper too, since Grasshopper is dependent on the Rhino EditPythonScript editor settings, I was told.
Certainly try it yourself but even the author of a Rhino Python book seemed to say it has gotten too messy to work, since it relied on the minute technical details of the Enthought site package. I also tried some pre-compiled binaries, but I think the 64 bit was only for AMD processors and the 32 bit wouldn't work since I'm on 64 bit Rhino and Windows. All quite uncertain, since there's no manual really.
Hi Lluis,
If you are interested in getting the job done on both 32-bit and 64-bit Rhino, right now a working solution is outlined here:
http://www.grasshopper3d.com/profiles/blogs/using-math-net-numerics...
Thanks
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by