NumPy and SciPy Support in IronPython 2.7 – An Update

Since I last wrote about NumPy and SciPy support in IronPython (see the NumPy and SciPy Support in IronPython 2.7 post), I’ve received some additional e-mails from readers on the topic. It turns out that there are some twists and turns to this support issue. Some readers have noted that the use of file from Enthought actually causes problems with the Visual Studio IDE. You may very well see an assertion error. The error shows up when you attempt to type clr.AddReference(. As soon as you type the (, the IDE displays the assertion error. I haven’t personally experienced the error, but you can find discussions of it at and (amongst other locations).

The issue is that the NumPy and SciPy support is strongly compiled to use a specific version of the IronPython libraries. In fact, a few authors have gone on to suggest that you use the version of IronPython supplied by Enthought, which seems like a good idea to me. I’m using IronPython 2.7.3 downloaded directly from the Codeplex site without any problem. For the time being, I’ll continue to use this version for your support questions so that I can provide the best possible information. If you encounter problems using this version, you may have to download the Enthought-specific version of IronPython to ensure NumPy and SciPy support works (or go without these libraries).

Simply installing the Enthought version of IronPython won’t be enough to fix the problem, unfortunately. You must remove the NumPy and SciPy library files completely using the ironpkg –remove command (specifically ironpkg scipy –remove in this case). You must then uninstall the copy
of IronPython that caused the error, which includes physically removing
the folder that contains the IronPython files. After you remove everything, restart Visual Studio to ensure that your IDE is working properly. Then you can install the Enthought version of IronPython and reinstall the NumPy and SciPy libraries. Following this procedure should fix the assertion error if you’re experiencing it.

I’ve been told that there will eventually be a fix for this problem, but when you think about it, the fix can’t be complete using the current programming strategy because you’re relying on low level routines to perform a specific task. Remember that you must start your application using the -X:Frames switch or you’ll most definitely run into problems. Let me know if you encounter any other issues with this particular issue at


Author: John

John Mueller is a freelance author and technical editor. He has writing in his blood, having produced 99 books and over 600 articles to date. The topics range from networking to artificial intelligence and from database management to heads-down programming. Some of his current books include a Web security book, discussions of how to manage big data using data science, a Windows command -line reference, and a book that shows how to build your own custom PC. His technical editing skills have helped over more than 67 authors refine the content of their manuscripts. John has provided technical editing services to both Data Based Advisor and Coast Compute magazines. He has also contributed articles to magazines such as Software Quality Connection, DevSource, InformIT, SQL Server Professional, Visual C++ Developer, Hard Core Visual Basic, asp.netPRO, Software Test and Performance, and Visual Basic Developer. Be sure to read John’s blog at When John isn’t working at the computer, you can find him outside in the garden, cutting wood, or generally enjoying nature. John also likes making wine and knitting. When not occupied with anything else, he makes glycerin soap and candles, which comes in handy for gift baskets. You can reach John on the Internet at John is also setting up a website at Feel free to take a look and make suggestions on how he can improve it.