How to install numpy and scipy for Ironpython27? The old method does not work

I think this is the most popular way to do this before:

https://pytools.codeplex.com/wikipage?title=NumPy%20and%20SciPy%20for%20.Net

But this link no longer exists:

https://store.enthought.com/repo/.iron/


I recently found a clone for instructions, and also found a clone ironpkg-1.0.0.py on github. But http://www.enthought.com/repo/.iron/eggs/index-depend.txt no longer exists on the Internet (I searched for it, but could not find it)

Getting started with SciPy for .NET.

1.) IronPython Download and install IronPython 2.7, this will require .NET v4.0.

2.) Change PATH

Add the installation location to the path, this is usually: C: \ Program Files \ IronPython 2.7

But on 64-bit Windows systems this is: C: \ Program File (x86) \ IronPython 2.7

As a test, open the Windows command prompt and go to the directory (which is not listed above) and enter:

ipy -V PythonContext 2.7.0.40 on .NET 4.0.30319.225

3.) ironpkg

Bootstrap ironpkg, which is the package installation manager for binary (egg-based) Python packages. Download ironpkg-1.0.0.py and enter:

ipy ironpkg-1.0.0.py --install
The ironpkg command should now be available:

ironpkg -h (useful help text displayed here)

4.) scipy

Installing scipy is now easy:

ironpkg scipy numpy-2.0.0b2-1.egg

Question

I think I did as much as I could. Any body manage to install numpy and scipy for Ironpython27?

+9
source share
5 answers

[SUPPORT SUPPORT COMMENT: The link in this answer is not valid. See Answer below Jonathan Marta August 17, 2018]

For those trying to get a numpy / scipy install for ironpythopn, enthought has moved the download link to https://store.enthought.com/repo/.iron/ . The link will be available only if you are registered.

Therefore, you must first register for free, then open the above link, and then follow these steps:

  1. Download IronPython-2.7.msi and install it.

  2. Download ironpkg-1.0.0.py from the link above.

  3. Using the command line, change to the directory where you placed ironpkg-1.0.0.py and run ipy ironpkg-1.0.0.py --install Check if the installation worked with ironpkg -h
  4. The last step is slightly different from that suggested by the Entucts. Running ironpkg scipy will not work as it looks at the old download web address. Instead, download all the eggs and index-depend.txt from the link above. To install on the job, you will need to change the download location in the configuration file to point to the local drive instead of the website. The configuration file can be found in the user directory, for example. C:\Users\Nilster\.ironpkg . Open it in the text panel and change the location to the directory in which you loaded the eggs. For example, my view looks

    IndexedRepos = ['file: // C: \ Work \ Python \ Enthought_Eggs',]

  5. Then run the following to install numpy / scipy ironpkg scipy

  6. Check if the installation worked using ipy -X:Frames -c "import scipy"

+14
source

Enthought support is here.

Iron Python packages for numpy and scipy can be downloaded here: http://code.enthought.com/.iron/README.txt http://code.enthought.com/.iron/eggs/index.html

For your information, Microsoft stopped working on the IronPython project in 2012 in favor of supporting standard CPython. These archived versions of numpy and scipy were created in 2011 (therefore do not contain new features or fixes) and are 32-bit. We do not plan to update them in any way.

For your information, we usually recommend those who want to use Python in the context of .net to consider using the actively developed pythonnet package to interact with the living CPython ecosystem.

+5
source

Just to confirm @Nilster’s second sentence: I just received an email from Enthought support saying the following: [Note: this link is out of date.]

IronPython repositories are still available, but are no longer supported. You must be registered at Enthought.com to access them. Link to these repositories: http://www.enthought.com/repo/.iron/

After registering, I followed the instructions of Nilster, and everything worked without a hitch. The only thing I would add is that the .ironpkg configuration file mentioned in step 4 is a Windows system file, so you show system files in the options for viewing the Windows folder; just showing hidden files will not show it

+1
source

So, the instructions on the Enthough link gave me all the way to step 4 (ironpkg scipy), but then I had a problem with urllib2 (I don’t know what went wrong, it just says: "Unable to open URL ...")

And although this is another post: http://www.grasshopper3d.com/forum/topics/scipy-and-numpy I still stick: "NumpyDotNet.NpyCoreApi" threw an exception

so I give up, it was a rabbit hole. The problem is clearly that IronPython is very old and should be avoided in my opinion.

+1
source

Updated July 2019 Instructions:

I was able to run scipy and run it in IronPython, but could not fully follow @Nilser instructions. Here are some updated instructions to make this work.

As others have said, the repo is now located at http://code.enthought.com/.iron/eggs/index.html . Don't worry about registering an Enthoughts account to access the old link, as some of the comments above suggest.

For some reason, the ironpkg-1.0.0.py file is no longer hosted in the Enthought repository. I was able to track it and post on github to make it easier to find.

  1. Download IronPython-2.7.5.msi from the IronLanguages ​​GitHub page and install it. I could not get Sippy to work on new versions of IronPython. I believe the dlls are related to the release of 2.7.5 IronPython.
  2. Download ironpkg-1.0.0.1.egg from the Enthought repository at the above link.
  3. Copy the contents of the ironpkg-1.0.0.py file from GitHub and create a new file with the contents named "ironpkg-1.0.0.py" in the same folder in which you loaded the ironpkg egg.
  4. Open a command prompt with administrator privileges and browse to the ironpkg-1.0.0.py file. Run ipy ironpkg-1.0.0.py --install . Check if the installation worked using ironpkg -h .
  5. Since Enthoughts changed the location of his repository, you need to change the ironpkg configuration file so that it points to the address of the new location. The configuration file can be found in the user directory, for example, c:\users\<your user name>\.ironpkg . Also note that this is a system file, so you must show system files to see it. Open it in a text block and update the address. Must be:
 IndexedRepos = [ 'http://code.enthought.com/.iron/eggs', ] 
  1. Now you can run ironpkg scipy to install Scipy and its dependencies.
  2. Check if the installation worked by running ipy -X:Frames -c "import scipy"
0
source

Source: https://habr.com/ru/post/984577/


All Articles