Scipy Superpack

This shell script will install recent 64-bit builds of Numpy (1.4) and Scipy (0.8), as well as Matplotlib (1.0), iPython and PyMC (2.1 alpha) for OS X 10.6 (Snow Leopard) on Intel Macintosh. All builds are based on recent development code from each package, which means though some bugs may be fixed and features added, they also may be more unstable than the official releases. Distributing them together should improve interoperability, since the supporting packages (Scipy, Matplotlib, PyMC) were all built against the accompanying build of Numpy. This package were compiled on OS X 10.6 using Apple’s Python 2.6.1, FFTW 3.2.2 and GCC 4.2 (build 5646). To avoid compatibility issues, the installer also optionally downloads and installs the gFortran compiler (4.2) built against Snow Leopard’s GCC 4.2 for Xcode 3.2.

Installer dialog

Download Scipy Superpack Installer for OSX 10.6 (Updated 16 December 2009)

To install, open a terminal in the directory that the script is located and call:

sh superpack_10.6_2009.10.21.sh

You will be prompted for your administrator password. If you have already installed the current gFortran, you can bypass that package during the install process.

Please note that you need to be using 64-bit Python to run these builds, so if in doubt, use Python 2.6.1 that ships with Snow Leopard.

Older Builds

Though I no longer update the Superpack for older Macs, here are the last builds from older configurations:

Scipy Superpack for OSX 10.5

(Note that this package was built against Enthought Python 4.3)

Scipy Superpack for PPC

Scipy Superpack for OSX 10.4 on Intel.

(Both require ActivePython 2.5.1 from ActiveState.)

275 Responses to “Scipy Superpack”

  1. Vasili Says:

    Hi, I have problems installing your package properly Running on leopard and python 2.5.1 All pthon eggs are installed in /Library/python/2.5/site-packages apparently when i start python in the shell by typing simply python then

    import numpy Traceback (most recent call last): File “”, line 1, in ImportError: No module named numpy

    Which is rather normal as /Library/python/2.5/site-packages is not in the sys.path when i actually start Ipython from the shell numpy loads normally but pylab wont work

    In [4]: import pylab

    ImportError Traceback (most recent call last)

    /Users/vasilis/ in ()

    /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/pylab.py in () —-> 1 from matplotlib.pylab import * 2 import matplotlib.pylab 3 doc = matplotlib.pylab.doc

    /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/pylab.py in () 201 from numpy import ma 202 –> 203 from matplotlib import mpl # pulls in most modules 204 205 # catch more than an import error here, since the src could fail too,

    /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/mpl.py in () —-> 2 from matplotlib import axis 3 from matplotlib import axes 4 from matplotlib import cbook 5 from matplotlib import collections 6 from matplotlib import colors

    /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/axis.py in () 12 from ticker import NullLocator, FixedLocator, AutoLocator 13 —> 14 from font_manager import FontProperties 15 from text import Text, TextWithDash 16 from transforms import Affine2D, Bbox, blended_transform_factory, \

    /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/font_manager.py in () 38 import matplotlib 39 from matplotlib import afm —> 40 from matplotlib import ft2font 41 from matplotlib import rcParams, get_configdir 42 from matplotlib.cbook import is_string_like

    ImportError: dlopen(/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/ft2font.so Reason: image not found

    import scipy works fine though….

    n [14]: scipy.test(1,10)

    ImportError Traceback (most recent call last)

    /Users/vasilis/ in ()

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/testing/nulltester.pyc in test(self, labels, *args, **kwargs) 11 def test(self, labels=None, *args, **kwargs): 12 raise ImportError, \ 13 ‘Need nose >=0.10 for tests - see %s’ % \ —> 14 ‘http://somethingaboutorange.com/mrl/projects/nose’ 15 bench = test

    ImportError: Need nose >=0.10 for tests - see http://somethingaboutorange.com/mrl/projects/nose

    Any ideas/help on that

    Cheers

    Vasili

  2. chris Says:

    Thanks for the feedback, Vasili. I have added nose to the installer, so that error should be taken care of. You can install it yourself by: sudo easy_install nose

    As for the linking error, this is an ongoing problem that I have with matplotlib. I am still trying to get it resolved, so stay tuned.

  3. Ben Willmore Says:

    I installed matplotlib using easy_install, then installed the superpack. Importing scipy fails:

    from scipy import * Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/linalg/init.py”, line 8, in from basic import * File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/linalg/basic.py”, line 17, in from lapack import get_lapack_funcs File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/linalg/lapack.py”, line 17, in from scipy.linalg import flapack ImportError: dlopen(/Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/linalg/flapack.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Library/Python/2.5/site-packages/scipy-0.7.0.dev4167-py2.5-macosx-10.5-i386.egg/scipy/linalg/flapack.so Reason: image not found

  4. Ben Willmore Says:

    P.S. I tried installing gfortran from the gfortran downloads page, and it installed the following libraries, not including the one scipy was looking for (libgfortran.2.dylib)

  5. Ben Willmore Says:

    OK, manually downloading and installing this old gfortran package produces apparent success: http://www.macresearch.org/files/gfortran/gfortranCompleteInstaller_4.2.zip

    From a link here: http://www.macresearch.org/xcode_gfortran_plugin_update

  6. chris Says:

    OK, everyone — I am currently in the process of making universal builds of these packages. Hold off installing the Superpack until I have them completed. This should eliminate many of the compatibility and linking issues that folks are having. Stay tuned.

  7. chris Says:

    All right, the new installer includes universals of numpy and matplotlib that should address some of the compatibility issues. I have also changed the gfortran installer to the one at research.att.com that is used to build the Mac R distribution. Let me know if there are any issues.

  8. Jeff Says:

    Your newest SuperPack installed successfully on my MacBook Pro (10.5.2). I haven’t done much work with it, but importing NumPy/SciPy and basic plotting seem to work so far. Thanks!

  9. Ben Willmore Says:

    Just a ‘me too’ — the basics are working fine with the newest superpack. Also, I didn’t realise the installer was an editable automator workflow, which is cool. I’d assumed it was compiled somehow.

  10. Travis Says:

    Chris,

    First off, thanks for making this. I’ve struggled trying to install scipy variously over the last few months from source, using fink and macports.

    The install was successful on my macbook pro (10.5.2)

    Ipython seems to work fine, I can import numpy and scipy with no problems. numpy.test() runs with no failures, but scipy.test() has some troubles.

    I wonder if this is something I need to worry about:

    In [21]: scipy.test(1)

    TypeError Traceback (most recent call last)

    /Users/n/ in ()

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4174-py2.5-macosx-10.3-i386.egg/scipy/testing/nosetester.pyc in test(self, label, verbose, extra_argv, doctests) 113 If True, run doctests in module, default False 114 ”’ –> 115 argv = self._test_argv(label, verbose, extra_argv) 116 if doctests: 117 argv+=[’–with-doctest’]

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4174-py2.5-macosx-10.3-i386.egg/scipy/testing/nosetester.pyc in _test_argv(self, label, verbose, extra_argv) 96 if label and label != ‘full’: 97 if not isinstance(label, basestring): —> 98 raise TypeError, ‘Selection label should be a string’ 99 if label == ‘fast’: 100 label = ‘not slow’

    TypeError: Selection label should be a string

  11. James Snyder Says:

    Thanks for the excellent packaging-up of this software :-)

    I was wondering if you might also provide some hints as to how you did the builds themselves? I may consider tracking svn in the future, and I’m unsure as to whether the instructions on the scipy site for building on os x are sufficient to get things compiled as you have on 10.5.2.

    I suppose I’d also like to know the differences, if any, so that if I do go that route, I have things built so that they will go into the same places.

  12. Nick Says:

    Hi Chris - thanks, as always, for packing these tools for the Mac/Py/Sci community. I ran across a subtle issue - I use the MacPython version of python as they keep updating it as python updates (2.5.2 at last check), whereas the python distributed with 10.5 is stuck at 2.5.1. Your automator script runs wonderfully, but it only updates the stock install of python; the new python’s site-install directory is left unaltered.

    I managed to use the automator package by seeing what files it downloaded and how it installed them, and did the same steps from the command line, figuring that because your script didn’t load my .profile, it didn’t have the same env variables set, so it installed to the ‘wrong’ python.

    Is there some way of feeding your automator script the ‘correct’ location of python? How does it determine that anyway?

    Thanks for your time,

  13. chris Says:

    @Nick: Interesting, because the current superpack was built with MacPython 2.5.2, and not the stock Python. Since everything is installed using setuptools’ eggs, you need to take care as to where your setuptools are installed. It sounds like you need to move yours over to MacPython.

  14. chris Says:

    @Ben: Sorry I removed your comment — it was rather long and was messing up the layout of the page. The numpy builds sometimes fail their tests, as the code is constantly being changed. Most of the time, those errors are not show-stoppers, as long as the errors are not related to the functionality that you are using yourself.

  15. devicerandom Says:

    Hi, I am becoming mad trying to let your package working on my OS X 10.5 Macbook. I am trying to run an application that depends on wxpython, scipy and matplotlib among other things. Problem is, wxpython seems to be in a path (that python finds) and scipy/numpy/matplotlib in another (that python fails to find)

    I tried various methods (.pth files, environment.plist) to add /Library/Python/2.5/site-packages to PYTHONPATH but they failed (probably due to my ignorance with the OS X environment, I’m so accustomed to Linux but I need that to help my OS X-addicted undergraduates…)

    What am I missing?

  16. chris Says:

    @devicerandom: I think your problem may be related to others in that you probably have 2 different python installations. True? Setuptools (which installs the .egg files for the Superpack) may be in one distribution, and wxPython in the other. If this is the case, you might remove the python executable of the unwanted python (or rename it) and either reinstall wxPython or setuptools, as appropriate.

    I wish I had Mac-addicted undergraduates.

  17. devicerandom Says:

    Ok, solved the previous issue by editing .profile on my home directory.

    Now I have another issue. I’m confused about the matplotlib version that it is shipped in your package. In particular, it does not contain PolarAxes. matplotlib.version tells me ‘0.98pre’, which is strange -isn’t last version 0.91 or something? How do I update the matplotlib version used in your package without doing too much hell?

    Thanks!

  18. chris Says:

    @devicerandom: As I advertise on this page, the Superpack is based on recent SVN builds for each package. So, these will always be newer than the released version of each. Obviously, there are tradeoffs in doing this, but for the most part you benefit from bug fixes and new features in the latest code.

    I’m not sure about the PolarAxes class — I have a feeling they were probably renamed to something else, or moved, but that is a question for the matplotlib list.

  19. devicerandom Says:

    “I wish I had Mac-addicted undergraduates.”

    I don’t. I don’t like OS X. Seems like a crippled Unix to me. I have a Macbook but I 99% of time use Gentoo Linux on it. I booted on OS X for the first time in months to install a Python data analysis software I wrote -to understand myself how to install its dependencies on OS X so to help her, and also for the geek fun :) - and I found myself in a sad dependency hell…

    However, it seems there’s something odd in the version of matplotlib you included in your nice package. There is a library I need -that’s Ken McIvor’s WXMpl- that just doesn’t play well with it. I tried to comment out the PolarAxes part (I don’t use polar plots so I tried), but it again complained of another thing not found in matplotlib. Seems just like the matplotlib API that wxmpl expects and your library expects are just different.

    I’d like to know how can I change my matplotlib version without making a mess of the superpack installation. Your package was so nice…

  20. devicerandom Says:

    Oh, ok, seen your latest comment now. If you know how to downgrade matplotlib, let me know.

  21. chris Says:

    @devicerandom: You can grab the .egg for the released version from the matplotlib sourceforge page. Then, I assume you would have to remove the existing matplotlib egg from the site-packages directory (you can force-upgrade an egg, but I dont think you can force-downgrade one) before installing it.

  22. devicerandom Says:

    Ok, solved the issue by easy_install-2.5 ‘ing the stable matplotlib (and dateutil).

    Thanks for your support and your software. Despite the little difficulties, it made my life easier :)

    You may consider releasing two versions of your superpack, a “stable” version and the “bleeding edge” version with stable and SVN packages respectively. People using pylab may stay ok with the svn, but the people building applications on matplotlib, scipy etc. may find their life easier if they know what API they are using (and therefore, the users of these apps should expect less surprises).

    I’d like to help you in releasing that, but I don’t know how python eggs/packaging stuff for OS X works…

  23. Ben Willmore Says:

    No problem, I didn’t realise the formatting would come out all strange. I’m sure you’re right that passing the tests isn’t important most of the time, but it’s a dealbreaker for me. I just can’t afford the possibility that numpy is quietly producing math errors.

  24. chris Says:

    @Ben: well, I suppose its not silently if the errors show up in the tests. If the errors are unrelated to what you are using numpy for, then it should not be a deal-breaker.

    I’m posting an update in a few minutes here, so you can give it a try if you like.

    @devicerandom: That is a possibility, and may be more what Ben is looking for also. I will try and make time to do this.

  25. Nick Says:

    Yep, reinstalling setuptools got it finding the ‘correct’ Python and then the automator script ran without a hitch. For those with the same problem, I needed to reboot the OS before setuptools seemed to point correctly - I don’t know why. Multiple installs of Python can be a pain; I think setuptools goes for the first one it sees in your $PATH, so modifying your $PATH is the way to go - of course, when an Applescript calls ‘do shell script’, it actually calls ’sh’, not ‘bash’, so it doesn’t have access to your path as defined in .profile. I really wasn’t too interested in playing with automator before, but I can see how it’s quite neat.

    Here’s an idea - when I run ‘do shell script “env”‘, I get PATH=/usr/bin:/bin:/usr/sbin:/sbin (among lots of other things). Perhaps putting the following in your Automator pack at the beginning would be better:

    do shell script ” cp .profile .temp_profile chmod 0755 .temp_profile ./.temp_profile rm .temp_profile [the other stuff…]

    This way, whatever python is first in the user’s PATH (which presumably is the one they want to be updated) is the one the rest of the shell script sees first? Just an idea.

    Thanks as always for your efforts in making other people’s lives easier!

    Nick

  26. Nick Says:

    Whoops, it deleted the returns - this is what I meant:

    do shell script ”cp .profile .temp_profile; chmod 0755 .temp_profile; ./.temp_profile; rm .temp_profile; [the other stuff…]”

  27. Steve Says:

    I made the possible mistake of installing MacPython and then running the Automator on a new MacBook with Leopard. I am extremely new to using Python and would be very grateful for any help you can give with the following problem:

    When I run ‘ipython’, I can use numpy When I run ‘python’, I cannot use numpy

    My method for determining whether numpy can be used is to execute the following line

    from numpy import *

    The reason I need it to work from just ‘python’ is that I would like to execute NumPy scripts from TextMate (the previous line also does not work when executed in TextMate). As per Nick’s instructions, I tracked down the setuptools egg for 2.5 and ran it from the command line, then restarted and re-ran the Automator. The problem persists. Here is my $PATH = “/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin”

    Thanks again for providing the Automator and any help you can give me.

  28. chris Says:

    @Steve: You probably have to make sure which python you are actually using. When you type “which python”, what does it say? At the moment, its not clear whether the superpack is being installed in the wrong place, or that your python is the wrong python.

  29. Steve Says:

    ‘which python’ gives me

    /Library/Frameworks/Python.framework/Versions/Current/bin/python

    … I see. Now when I run ‘/usr/bin/python’, the command works. Do I simply update my path to move /usr/bin ahead of ‘/Library…’ and breathe a sigh of relief?

  30. chris Says:

    Well, it depends on which python you want — /usr/bin/python is likely Python 2.5.1 bundled with Leopard, while the framework python is MacPython. I always try and make /usr/bin/python point to the python I want, so there is no confusion.

  31. Steve Says:

    Good point. It seems I need two things:

    1. To install the superpack for MacPython rather than (or in addition to) the bundled one
    2. To make /usr/bin/python point to MacPython (which is what is in /usr/local/bin)

    So should I just manually adjust the link in usr/bin/python to the MacPython binary (using ln on the Terminal) and then re-run the automator?

    (As you can see, I’m unfamiliar with how things are done the right way)

  32. chris Says:

    Yeah, I just changed the symbolic link in /usr/bin to point at MacPython, then installed the packages after that.

  33. Steve Says:

    chris, I do hate to be a bother, but after changing the symlink to point to MacPython (which is what ‘which python’ returns):

    sudo rm /usr/bin/python ln -s /Library/Frameworks/Python.framework/Versions/Current/bin/python /usr/bin/python

    and re-running the automator, importing numpy fails for me. I even re-ran ’sudo sh setuptools-0.6c8-py2.5.egg’, restarted, re-ran the automator, restarted and the negative result remains.

    I’m obviously missing something, but I lack enough knowledge of how it all fits together to know exactly what.

  34. Steve Says:

    Sorry for all the trouble. The solution to my problem is to actually run the ez_setup to reinstall setuptools from the terminal. Then the automator works and I can run numpy etc.

  35. Abhik Says:

    The eggs used by the Automator script do not exist on the server but the script finishes without giving any errors. I did find newer version of the eggs on your server..

  36. James Says:

    I had problems similar to others here where I had two different versions of python running. After getting easy_install pointing to the correct version of python I was still not able to get the script to run. However just manually running your eggs worked wonderfully. That alone was very helpful.

    For those that aren’t able to get the script working, I would recommend just manually running the egg files in the Automator script.

    Those files can be found by just typing from the ScipySuperpackInstaller.app/Contents directory: cat document.wflow | grep egg

    Thanks chris for making this all in one place and actually working for the mac community on this.

  37. Hendrik Says:

    This is bizarre. Since installing the latest Scipy Superpack (I think) the ‘b’ key does not work anymore in ipython. No problems anywhere else. Practical joke by one of the programmers? Is anybody else seeing something like this? I have no idea what could be causing this.

  38. Hendrik Says:

    Ignore my previous comment. After nuking my ~/.ipython directory the ‘b’ key is back in action. Must have been some strange interaction between old settings and new version.

  39. fosca Says:

    Thanks a lot for this beautiful package! I searched during 4hours with my PhD student to install Scipy on my Macbook Pro under Tiger 10.4 and we finally found your webpage that helped us a lot. Congrats for the job!

  40. John Says:

    Thank you. I spent 2 hours trying to get these packages working individually until I found your site. Great work.

  41. Samuel Says:

    Great script!

    I would apreciate a version that optionally switch to stable releases instead of the bleeding edge.

    When doing import scipy; scipy.test(), I also get something like “Ran 0 tests in 0.04s”. This seems to be related to nose and egg packages.

  42. MattF Says:

    Chris–

    Thanks for the superpack! I’ve been using Python + the usual scientific modules on WinXP for a while and was contemplating installing an equivalent on my (new!) iMac at home– but when I found that there were four different versions of Python-on-the-Mac, I had lots of misgivings. But the superpack appears to be pretty close to what I’m looking for, and I appreciate that.

    Two questions– it seems, from a quick look, like you’re using the native OS X 10.5 Python more or less as is, and adding the superpack modules to the /Library/Python/2.5/site-packages directory. Is this right? Has other stuff been changed?

    Also, are there gotchas in uninstalling the superpack and upgrading, when and if this becomes possible/necessary?

  43. chris Says:

    @MattF: I was originally working with Leopard’s Python 2.5.1, but recently switched to MacPython 2.5.2. These installers should work on either. The only one I would avoid is Fink’s Python (actually, I would avoid anything from Fink, but that is another story).

    I try to post updates every few weeks, and have had no reports of issues in doing so. As far as uninstallation goes, its just a matter of deleting the Python .eggs from site-packages.

  44. douglas Says:

    Hi. Excellent package. I’ve installed python 2.5.2 from http://www.python.org. It is active as /usr/local/bin/python. I was hoping the installer would find that version. Instead it finds /usr/bin/python (2.5.1). Am I doing something wrong? I thought the “MacPython” you were talking about was the native mac python build from http://www.python.org. Do I have to uninstall the 2.5.1 from apple? Seems dangerous. . .

  45. douglas Says:

    Never mind. I see the stuff about pointing ez_install in the right direction. . . sorry.

  46. Steve L Says:

    Hi Chris,

    Thanks for putting these together for the Mac/python community.

    I have a suggestion, regarding the installer. It looks as if you put up a new installer here with the URLs of the newly compiled *.eggs hardcoded into the automator script everytime you update.

    This requires people to redownload your installer every time they want to just upgrade the numpy/scipy install.

    Why not just hard code the URLs for the numpy/scipy/etc. eggs so that the automator script will always just downloaded the latest egg you compiled. For instance, a an example URL would be something like “http://idisk…./numpy-NEWEST.egg”, …/scipy-NEWEST.egg etc so we just keep the same installer and just fire it up locally everytime a new egg is posted, instead of redownloading it.

    Just thinking it might help with your bandwidth and such.

    Thanks again, -steve

  47. chris Says:

    @Steve: Thanks for the suggestion. I had thought of that once before, but decided folks might want to know what version they were installing. I suppose most people realize that it is always a cutting-edge build from the not-too-distant pas, so perhaps it is not such an issue. I may give it a shot next time around.

  48. Jonathan Says:

    Just wondered if you could post the URLs of the actual eggs you use so that the same effect could be achieved by using a few lines of easy_install. It could be quite helpful to the SciPy community if you made (binary) eggs that are officially available when you try “easy_install scipy”.

  49. Jonathan Says:

    Forgot to add this in the last comment — for ipython, numpy and pylab, “easy_install” works quite well, but “scipy” is the killer for Mac OSX…. That’s why I suggested just creating eggs for officially released SciPy. Would be kind of nice…

  50. Julia Says:

    Hello, I just installed the superpack in my mac book pro. Everything works (thanks!). But I have a question about pymc. In my old computer I had an older PyMC version which had the “MetropolisHastings” class. But this class is not in this new version, did the name change? And, is there a tutorial for this new version? Sorry if this is not the proper place for this question… Thanks a lot, Julia

  51. chris Says:

    @Julia

    Version 2 of PyMC is almost a complete recoding of the software, and it looks rather different. On the pymc development page (http://pymc.googlecode.com) there is an archive of the 1.3.5 version if you prefer it, but 2.0 is much more powerful, and faster. The source code has a draft of the new user guide; if you have trouble building it (using the builddocs) command, send me a message directly and I will email you a pdf copy.

  52. Nor Says:

    Chris, How do you manage to compile scipy under Python 2.5 and OSX 10.5.2? When I try using –fcompiler=gnu95, I get linking errors with gfortran missing many things. It looks like it is related to the Python framework (i.e. I can get rid of them by adding -framework Python) but I still get a _main not found error etc.. Is there a trivial way to get this compiled for OX?

  53. chris Says:

    @Nor: Are you sure your fortran compiler is on your path? What does “which gfortran” yield? Also, which Python are you using — the one that comes with Leopard, or MacPython?

  54. Carlos Says:

    I just installed the superpack on my 10.5.2 MBP, and I can’t import scipy.stats: $ import scipy.stats Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/stats/init.py”, line 7, in from stats import * File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/stats/stats.py”, line 195, in import scipy.special as special File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/special/init.py”, line 8, in from basic import * File “/Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/special/basic.py”, line 8, in from _cephes import * ImportError: dlopen(/Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/special/_cephes.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Library/Python/2.5/site-packages/scipy-0.7.0.dev4468-py2.5-macosx-10.3-i386.egg/scipy/special/_cephes.so

    I can’t find a version of gfortran that includes an intel version libgfortran.2.dylib, and trying to fool it into linking against libgfortran.3.dylib didn’t work. Any ideas?

    Thanks!

  55. Max Says:

    I had the same problem as Carlos, but managed to solve it by installing the GNU Fortran compiler from http://r.research.att.com/tools/.

  56. vikram Says:

    i am not able to install this superpack. i downloaded numpy from the website it works fine. but thie superpack is not installing. please help

  57. chris Says:

    @vikram: I’m afraid I will need a bit more information than that — which Python and version are you using? What sort of error messages are you getting?

  58. Jo Claridge Says:

    Hi, I want to install the superpack on 10.4 on an intel macbook pro but the link to the OS X 10.4 installer on intel seems to be broken.

    cheers, Jo

  59. Anand Says:

    I don’t know how you do it, but I’m glad you do.

  60. c. Says:

    Hi, same as above I have an OS X 10.4, do you plan to repair the link for the installer ? Thanks !

  61. Thomas Philips Says:

    I’m brand new to the Mac, and would greatly appreciate some hep with the SciPy superpack installation. I first downloaded and installed Python 2.5.2 from python.org and then downloaded and installed the SciPy superpack. Scipy seems to import correctly into the Python 2.5.1 that comes with the Mac (I can start it in a terminal window), but i cannot import it into MacPython 2.5.2 (which I usually start by double clicking IDLE).

    Question 1: What do I have to do in order to make SciPy work with both Python 2.5.1 (that comes with the Mac) and 2.5.2 (that I installed myself)?

    After installing the super pack, I opened a terminal window, and typed ipython. Here’s what I got:

    Welcome to IPython. I will try to create a personal configuration directory where you can customize many aspects of IPython’s functionality in:

    /Users/tom/.ipython WARNING: Installation error. IPython’s directory was not found.

    Question 2: What’s the problem. and how can I fix it?

    Thanks in advance for your assistance.

  62. chris Says:

    @Thomas: Its not wise to try and manage 2 different python installations on the same machine, unless you have a good reason to do so. It sounds like you want to use MacPython, so the first thing you want to do is make sure that its the default python that gets called each time you run Python. So, you can do one of 2 things: either change the symbolic links for python in /usr/bin to point to the appropriate python executable, or put the MacPython bin directory at the front of your path. That is,

    /Library/Frameworks/Python.framework/Versions/Current/bin

    on my machine. Once you can confirm that you are running the Python you think you are, go ahead and install the packages.

  63. Thomas Philips Says:

    Given that I’m brand new to the Mac, may I trouble you for some specific guidance, in particular, how do I change the symbolic links for python in /usr/bin to point to the appropriate python executable, or put the MacPython bin directory at the front of my path permanently? Does this have any implications for the operating system, which is now pointing to a different version of Python? Following some suggestions I got from the Pythonmac-SIG mailing list, I tried the following: 1. I started python, typed >>>import sys, >>>sys.path. The output follows my note. I’d be lying if I said that it was anything other than cryptic. 2. I downloaded RCEnvironment from http://www.rubicode.com/Software/RCEnvironment/. It seems to show ABSOLUTELY NO ENVIRONMENT VARIABLES, and sternly warns the user against changing the path. I have therefore refrained from doing so.

    I’d particularly appreciate newbie level assistance - I’m brand new to the Mac, and don’t have any sort of feel for how/where/when/why things are done, and where programs are kept. Once again, thanks in advance for your assistance.

    Thomas Philips

    [”, ‘/Library/Python/2.5/site-packages/setuptools-0.6c8-py2.5.egg’, ‘/Library/Python/2.5/site-packages/numpy-1.2.0.dev5264-py2.5-macosx-10.3-i386.egg’, ‘/Library/Python/2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3-i386.egg’, ‘/Library/Python/2.5/site-packages/scipy-0.7.0.dev4423-py2.5-macosx-10.3-i386.egg’, ‘/Library/Python/2.5/site-packages/pymc-2.0dev_r768-py2.5-macosx-10.3-i386.egg’, ‘/Library/Python/2.5/site-packages/ipython-0.8.3.svn.r3001-py2.5.egg’, ‘/Library/Python/2.5/site-packages/readline-2.5.1-py2.5-macosx-10.5-i386.egg’, ‘/Library/Python/2.5/site-packages/nose-0.10.3-py2.5.egg’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5′, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload’, ‘/Library/Python/2.5/site-packages’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC’]

  64. chris Says:

    @Thomas: The output there is from the python that ships with Leopard. So, I’m assuming you want to use MacPython instead?

    Lets do it the easy way first — change your path. In your home directory, create a file called .bash_profile (if it does not exist already). Make sure that it says the following:

    PATH=”/Library/Frameworks/Python.framework/Versions/2.5/bin:${PATH}” export PATH

    Assuming that is the path that you want. Then, close your terminal, open a new terminal, and see which python you are using. For example:

    Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.

    means that MacPython is loaded. IF thats the case, you can go ahead and load the modules, and they should end up in the right place.

  65. Thomas Philips Says:

    Chris, I’m closer but not home as yet. I added a .bash_profile file with the path you recommend in it, re-downloaded and installed MacPython 2.5.2 and then re-downloaded and reinstalled the SciPy superpack (the download seems to be only 600K, can this be right?)

    I still don’t see scipy or numpy in Python 2.5.2. I used spotlight to search for scipy and it found nothing. On importing sys and typing sys.path at the command prompt I get:

    import sys sys.path [’/Users/tom/Documents’, ‘/Applications/MacPython 2.5/IDLE.app/Contents/Resources’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg’, ‘/Applications/MacPython 2.5/IDLE.app/Contents/Resources’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5′, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload’, ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages’]

    I see two Python installations - one in Macintosh HD > Library > Frameworks > Python.framework > Versions > 2.5 > bin (this appears to be MacPython), and the other in Macintosh HD > Developer > SDKs > MacOSX10.5.sdk > System > Library > Frameworks > Python.framework > Versions > 2.5 (this appears to be the Apple supplied Python)

    However, I have not been able to locate any of the files that the superpack installed - scipy, numpy, gfortran etc. and 660K seems far too small for all these things combined. So I’m still at a loss - what should I try next?

    Thanks in advance

    Thomas Philips

  66. chris Says:

    Hi Thomas,

    The Superpack installer is just a script. When you run it, it dynamically grabs the packages from my site and installs them. After doing this, do you still get nothing when you call “import numpy” from the python shell?

    One more thing you can try:

    sudo rm /usr/bin/python sudo ln -s /Library/Frameworks/Python.framework/Versions/2.5/bin/python /usr/bin/python

    (then do the same for pythonw)

  67. Thomas Philips Says:

    I still get nothing when I “import numpy”. Tried sudo rm /usr/bin/python followed by sudo ln -s /Library/Frameworks/Python.framework/Versions/2.5/bin/python /usr/bin/pythonthis, and it did nothing for me.

    I’ve resorted to using the EPD Python distribution, as I don’t seem able to fix this problem with my limited knowledge of MacOS X. I’m truly surprised by my experience with Python - a Windows installation of Python, Numpy, and Scipy s far easier, and seems to require far less specialized knowledge of the operating system- perhaps its the fact that I am new to the Mac that makes it seem so convoluted!

  68. chris Says:

    @Thomas: well, for a newcomer to Mac I would have suggested staying with Python 2.5.1 that shipped with OSX. It works fine out of the box for almost everyone. For me, EPD was nice because it even went in and changed the path for me, so it also worked without any fiddling. I’m not sure what has happened in your case.

    If you type “env” from the command line, what does your PATH say? Does this jive with the python that you get from the command line?

  69. Paul Reber Says:

    I’m unable to get the package installed as well. I have MacPython running (2.5.2) on my Mac OSX 10.5.3 iMac. I was able to install numpy 1.1.1 directly from the sourceforge site, but trying to use the packages here, they appear to be ending up in the wrong directory.

    These packages are ending up in /Library/Python/2.5/site-packages but that’s not where IDLE or MacPython are looking for them. Any advice on how to get them loaded or moved to the correct directory?

    I changed /usr/bin/python to point to /Library/Frameworks/Python.framework/versions/Current/bin/python and re-installed but import numpy still brings up 1.1.1 and import scipy fails.

  70. chris Says:

    @Paul: Did you install packages using easy_install prior to moving to MacPython? This may be where users who transition from one flavour of Python to another may be running into problems. Though the path has changed, easy_install is still associated with the older Python.

    If you call:

    which easy_install

    what does it return?

  71. Paul Reber Says:

    which easy_install returns: /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install

    I didn’t run easy_install manually before moving to MacPython. I’m pretty sure I tried to upgrade to MacPython right away on a vanilla install of OSX 10.5.3. I did install numpy 1.1.1 before trying the superpack. It installed in the correct directory. FWIW, I’m trying to setup a development environment for data analysis programs on an iMac to mimic what we have working on other linux boxes (running Debian).

    I’ve been able to install some other packages in /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages and they are running correctly (that’s where numpy 1.1.1 ended up). I’m tempted to try moving all the scipy packages over to this directory. Will that work or will I need to run something to get them setup properly?

  72. chris Says:

    @Paul: its not generally a good idea to move these things manually. What does:

    which easy_install

    return when you call it? I’m pretty sure that is at the root of the problem.

  73. Paul Reber Says:

    See the first line in my previous post — it appears to point to the proper place. easy_install is coming from the MacPython installation (Current is a link to the 2.5 install).

    The apparently correct site-packages is in this tree. The Scipy Superpack is somehow ending up in /Library/Python/2.5/site-packages.

  74. Manas Alekar Says:

    Hi Chris,

    I ran the script, and it gave me a successful return. However, I cannot seem to get ipython to work. I cannot import scipy from IDLE either. Here is a snip of what happens when I try to run ipython.

    — begin —

    [manasalekar:~] ipython Traceback (most recent call last): File “/usr/local/bin/ipython”, line 5, in from pkg_resources import load_entry_point File “/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py”, line 2555, in working_set.require(requires) File “/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py”, line 620, in require needed = self.resolve(parse_requirements(requirements)) File “/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py”, line 518, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: ipython==0.8.3.svn.r3001

    I remember a previous installer working like a charm. Thanks for the great work and looking forward to some solution.

    Cheers, Manas

  75. chris Says:

    @Manas: sounds like another Python version conflict. Have you got MacPython on your machine as well as the one that shipped with Leopard? I will be revisiting this installer when I have time this weekend; automator seems to behave inconsistently.

  76. Itkovian Says:

    Hi,

    I have a fresh OSX Leopard install, with not other Python installation but the one that came with the latest OSX patch (10.5.2, afaik). The installer seems to install everything, except the shared libraries in /usr/local/lib where it should (I guess) drop the gfortran libs.

    Any suggestions? Starting over, the installer tells me everything is in place.

    Thx.

  77. Dav Clark Says:

    Currently, if you have an old version of the package installed, your updater won’t work! You can fix this by adding the ‘-U’ option to easy_install in the script. (editable w/ Automator application). Or just run easy_install by hand…

    Thanks for the packages! I really like that you’ve gone with the repository setup.

  78. chris Says:

    @Dav: Thanks — I’ve added the -U flag in the current script.

    I’m going to work on a non-Automator version of this script. Even with -U, it still does not update sometimes.

  79. charles Says:

    Hi chris -

    Thanks for making this package, it really cuts down on a lot of work for people.

    I am running this using Leopard’s version of python, 2.5.1, and I ran into a problem that was pretty random. I was able to run python and ipython OK, and I could run “import numpy”, “import scipy”, and “import pymc” without any errors, but when I ran “import pylab”, I got an error about a missing package named ‘pytz’. This turned out to be a time zone package (of all things). I ran ’sudo easy_install pytz’ and it installed with no problems, and when I ran “import pylab” again everything worked OK.

    I’m not sure if pytz is just a common package that I happened to be missing, or if this is something you should consider including in the script…

    Thanks again for all the hard work you’ve put into this! Your efforts are definitely paying off in helping make Python on OS X more usable.

  80. chris Says:

    @charles: I’ve added pytz to the script; it should grab it automagically now.

  81. Sebastian Says:

    Hi !

    Is there still a version of the superpackage for 10.4 and Python 2.3 or 2.5 available ? I need it at work on a machine still with Tiger. The link below the article is dead.

    Seb

  82. Jeremy Says:

    I am having issues with getting the installer to put things in /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages

    Instead it puts things under /Library/Python/2.5/site-packages

    When I do ‘which python’ it points to the MacPython version. Do I need to do something specific so that the SuperPack knows where to put things?

  83. Jeremy Says:

    I should note that I have pointed all /usr/bin instances of python to the MacPython version and it still is putting them in the wrong place. It puts the setup tools in the right place won’t actually install the packages there.

  84. chris Says:

    @Sebastian: I have replaced the old 10.4 package; not sure how it disappeared in the first place.

    @ Jeremy: I think it has to do with your old setuptools still putting things in /Library/Python. You can try manually reinstalling setuptools.

  85. D. Bastenhof Says:

    Dear Reader,

    I did run the ScipySuperpackinstaller on my MacBook Pro with Mac OS-X 10.5. It took a while mentioning it was downloading URL’s (not long) and then running apple script (long). After that the message Congratulations! The Scipy Superpack installation is complete. After that starting MacPython and running some programs I wrote, not using Scipy, which worked as it did before. Then running an easy script, using import scipy, which module then showed that it was unavailable! Before all this I was trying to get Python running with Gnuplot, also with no success. Is there no package that can easily be installed so that I can run Python and produce graphs? Momantarely I’m using HTBasic to produce the required calculations and graphs but HTBasic is not available for Mac OS-X. It doesn’t have to be freeware!

    Can you please help?

    Regards,

    D. Bastenhof

  86. Maggie Says:

    Hi,

    I need help. I downloaded the Python 2.5, the super pack and gFortran, but when I tried to import pylab, scipy and matplotlib, all of them didn’t work. But I could import numpy. What am I supposed to do? Thanks!

  87. chris Says:

    @Maggie: Which Python did you download? MacPython, Enthought, or another?

  88. Maggie Says:

    I downloaded MacPython 2.5

  89. ross Says:

    after installing on macos 10.5.2, apple installed python. i get error regarding gfortran when I try to import scipy.fftpack. there’s nothing in /usr/local/lib, in fact /usr/local/lib does not exist. i also noticed that there is no gfortran egg at drop.io.

  90. chris Says:

    @ross: You can grab a copy of gFortran here:

    http://idisk.me.com/fonnesbeck-Public/gfortran-4.2.1.dmg

  91. George Says:

    I think I have a similar problem to Paul Reber.

    I ran the installer it claimed to be successful. Then I tried to run python and import scipy and the module is not found. Same with trying to import it in ipython. Numpy can be found because I installed that a while ago by itself. Numpy is working in both python and ipython.

    python -V produces Python 2.5.1

    and which easy_install yields: /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install

    Here is the output of ls in /Library/Python/2.5/site-packages :

    $ ls README pymc-2.0_20080825-py2.5-macosx-10.3-i386.egg easy-install.pth pymc-2.0_20080917-py2.5-macosx-10.3-i386.egg ipython-0.8.3.svn.r3001-py2.5.egg pytz-2008c-py2.5.egg matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg nose-0.10.3-py2.5.egg setuptools-0.6c8-py2.5.egg numpy-1.2.0.dev5677-py2.5-macosx-10.3-i386.egg setuptools.pth numpy-1.3.0.dev5825-py2.5-macosx-10.3-i386.egg

    When I look in /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages all I see is the stuff I installed earlier (numpy and ipython for instance).

    I really want to get scipy working! I would greatly appreciate any help anyone can give me.

  92. chris Says:

    @George: You appear to be confounding 2 versions of python that are on your system. This is the predominant problem for those who cannot install this package successfully. The files in /Library/Python/2.5/site-packages is the python that comes with Leopard, while the one in /Library/Frameworks is either MacPython or Enthought. If you run:

    /Library/Frameworks/Python.framework/Versions/Current/bin/python

    and try importing scipy, does it work? If so, you just need to change the symbolic links in /usr/bin to point to that python.

  93. George Says:

    Chris, The result of running /Library/Frameworks/Python.framework/Versions/Current/bin/python and trying to import scipy is the following:

    $ /Library/Frameworks/Python.framework/Versions/Current/bin/python Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.

    import scipy Traceback (most recent call last): File “”, line 1, in ImportError: No module named scipy

    numpy, on the other hand, works.

  94. George Says:

    I just installed the latest MacPython (2.5.2) which set all my system defaults to that. Then I tried rerunning the superpack installed, and I scipy fails to import.

    So now the situation I reported in my original post is no longer quite the same. Python -V produces Python 2.5.2 and which easy_install results in /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install

    I would greatly appreciate any help anyone can give me to get scipy working!

    Thanks in advance.

  95. Chandra Shankar Says:

    Hi Chris

    Thanks for all your effort.

    I am trying out the tutorials mentioned here: http://www.scipy.org/SciPy_Tutorial

    To that effect I installed the Scipy Superpack and then tried the following command in ipython and got the following error

    from scipy import linsolve, sparse /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/linsolve/init.py:4: DeprecationWarning: scipy.linsolve has moved to scipy.sparse.linalg.dsolve

    warn(’scipy.linsolve has moved to scipy.sparse.linalg.dsolve’, DeprecationWarning)

    ImportError Traceback (most recent call last)

    /Users/cshankar/ in ()

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/linsolve/init.py in () 2 from warnings import warn 3 4 warn(’scipy.linsolve has moved to scipy.sparse.linalg.dsolve’, DeprecationWarning) 5 —-> 6 from scipy.sparse.linalg.dsolve import *

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/sparse/linalg/init.py in () 3 from info import doc 4 —-> 5 from isolve import * 6 from dsolve import * 7 from interface import *

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/sparse/linalg/isolve/init.py in () 2 3 #from info import doc —-> 4 from iterative import * 5 from minres import minres 6

    /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/sparse/linalg/isolve/iterative.py in () 12 all = [’bicg’,'bicgstab’,'cg’,'cgs’,'gmres’,'qmr’] 13 —> 14 import _iterative 15 import numpy as np 16 import copy

    ImportError: dlopen(/Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/sparse/linalg/isolve/_iterative.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Library/Python/2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/sparse/linalg/isolve/_iterative.so Reason: image not found

    Any Ideas on how to fix this?

    thanks Chandra

  96. michael Says:

    I have similar results to George on OS 10.5.5 The numpy self-test works fine; no scipy detected. Any thoughts would be appreciated.

    Thanks for all the effort here!

  97. chris Says:

    @George: when you type:

    which easy_install

    what does it return? easy_install is likely still associated with Leopard’s Python, and so is putting everything there, instead of your newer Python. If so, you will need to reinstall setuptools.

  98. chris Says:

    @Chandra: it appears that you do not have gfortran installed, or some other version. You can grab the copy from drop.io/superpack and install it by hand, if you like.

  99. DavidG Says:

    Hi,

    I downloaded superpack.sh to my Macbook Air running 10.5.5 and ran it. Everything looked good, but it doesn’t work:

    import scipy Traceback (most recent call last): File “”, line 1, in File “/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy-0.7.0.dev4645-py2.5-macosx-10.3-i386.egg/scipy/init.py”, line 89, in from numpy.testing import Tester ImportError: cannot import name Tester

    Any ideas?

  100. DavidG Says:

    Here’s another one:

    When I run ipython -pylab, I get:

    from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
    

    ImportError: No module named dateutil.rrule

  101. chris Says:

    @David: thanks for trying the new installer. The problem appears to be with numpy. If you import numpy, then check the version:

    numpy.version

    what does it return?

  102. DavidG Says:

    Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.

    import numpy numpy.version help(numpy.version)

    Help on module numpy.version in numpy:

    NAME numpy.version

    FILE /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-package s/numpy/version.py

    DATA release = True version = ‘1.1.1′

  103. Thomas Says:

    Hi Chris, thanks for your excellent Scipy distribution!

    I have little problem with your latest matplotlib (on MacPython 2.6) if I want to use the PDF backend:

    File “/Library/Python/2.6/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_pdf.py”, line 30, in from matplotlib.numerical_methods import quad2cubic ImportError: No module named numerical_methods

    it seems that the file numerical_methods was only recently checked into svn? http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg03788.html

    cheers,

  104. Salomon Says:

    Hello! Thanks for doing all of this!

    I seem to be having problems where during the installation I get the following messages:

    Installing numpy … Searching for numpy Best match: numpy 1.0.4 Adding numpy 1.0.4 to easy-install.pth file

    Using /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages Processing dependencies for numpy Finished processing dependencies for numpy Installing matplotlib … Searching for matplotlib Reading http://drop.io/superpack/matplotlib/ Reading http://drop.io/superpack/matplotlib/j.link; $( Download error: no host given — Some packages may not be found! No local packages or download links found for matplotlib

    error: Could not find suitable distribution for Requirement.parse(’matplotlib’)

    So, I’m getting an old numpy, and then I don’t get matplotlib or scipy, but I do get ipython and a couple other packages. Any help would be appreciated!

  105. chris Says:

    @Salomon: Strange error. I’m not able to replicate it. For example:

    Installing matplotlib … Searching for matplotlib Reading http://drop.io/superpack/matplotlib/ Reading http://drop.io/superpack/matplotlib/j.link; $( Download error: no host given — Some packages may not be found! Best match: matplotlib 0.98.3 Downloading http://drop.io/download/48ebcb6a/e11f435bfc941f820b308a76af754fc0faec2856/fde052a0-1968-012b-319e-0012799407ec/b6cd9f70-7580-012b-0d88-f347b251fe15/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg Processing matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg creating /Library/Frameworks/Python.framework/Versions/2.5.2001/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg Extracting matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg to /Library/Frameworks/Python.framework/Versions/2.5.2001/lib/python2.5/site-packages Adding matplotlib 0.98.3 to easy-install.pth file

    Were you having network issues at all, perhaps? The files are certainly there. Perhaps drop.io (the host) was down for a bit.

  106. charles Says:

    Hey Chris -

    Good to see you’ve changed the script into a shell script. Thanks again for getting this script all set up. It really untangled the whole installation process for me.

  107. josef Says:

    thank you man, this is a real timesaver!!!

  108. David Says:

    Thanks a lot for this, this really just simplified the whole installation.

  109. benjamin Says:

    Do i need to install the developpers tools to install this package ? I will get a new system with leopard this week end and i struggled so much to install scipy on my previous machine that i want things to go smoothly this time. To sum up : 1/ install leopard 2/ install developper tools ? 3/ scipy superpack Is that correct ?? Cheers.

  110. Daniel Says:

    Excellent installer build. So far, it all seems to work: Leopard on Intel Macbook with Apple-distro of Pyhton 2.5

  111. chris Says:

    @benjamin: I do not think you need the developer tools. I’m pretty sure about this, but I always install them as soon as I set up my Mac, so I suppose I am not sure. Let me know how it works out.

  112. Marcus Vinicius Says:

    I donwloaded and installed the Scipy Superpack on a MacPro running MacOS X 10.5.5. All went fine. I also installed on my Mac the native build of GTK+ and PyGTK, as by the developers recipe (http://developer.imendio.com/node/175). When I try to run some of my pygtk-based apps (originally developed on a Linux system), I get an error:

    from matplotlib.backends.backend_gtk import FigureCanvasGTK, NavigationToolbar Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gtk.py”, line 25, in from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK File “/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gdk.py”, line 29, in from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array ImportError: No module named _backend_gdk

    I assume that matplotlib was built without support for GTK, is it right? What would be the best way to rebuild matplotlib with support for GTK, without messing with the remaining packages installed by the Scipy Superpack?

  113. chris Says:

    @Marcus: You can grab the source from the matplotlib site, or via svn. Instructions are here. I have always had problems getting GTK to work properly, so I usually go with the TkAgg backend.

  114. Greg Detre Says:

    Hey Chris,

    Thank you for putting this together. It’s a huge benefit.

    I had a problem though running this on a MacBook Pro with Leopard. Everything installed, but when I ran ipython, i got this warning:

    WARNING: Readline services not available on this platform. WARNING: The auto-indent feature requires the readline library

    No syntax highlighting or tab-completion :( I did some googling, and it seems as though it has something to do with superpack.sh’s installation of the pyreadline library, which might only be necessary on Windows. so I tried sweeping that under the rug:

    cd /Library/Python/2.5/site-packages/ mkdir obsolete mv pyreadline-1.6.svn.dev_r3066-py2.5.egg obsolete/

    and now ipython’s happy! Is there a good reason for installing pyreadline as part of the superpack? Maybe this is a recent bug in pyreadline? I haven’t investigated further.

    Thanks again for all your work on this.

    Greg Detre

  115. Greg Detre Says:

    Whooops. In my last comment, the solution should have spanned 3 separate lines:

    cd /Library/Python/2.5/site-packages/

    mkdir obsolete

    mv pyreadline-1.6.svn.dev_r3066-py2.5.egg obsolete/

  116. Hendrik Says:

    Thanks for providing this handy installer. And thanks to Greg for the tip on the readline library. However both numpy.test() and scipy.test() return after running 0 tests, without reporting any errors. What is up with that?

  117. chris Says:

    @Hendrik: The short answer is that the testing framework (nose) does not seem to work with egg installers. I’ve posted a query about this to the nose google code page about 2 months ago, but have had no response. So, I have no idea if they will ever fix it.

  118. Jica Monsanto Says:

    @chris: thank you for this script! very helpful! :D @Gred Detre: thank you for the tip! :D

    it took me so long to figure out i had to use ipython and not python LOL

  119. Kevin Says:

    I had similar troubles to Greg. The installation of pyreadline made me unable to use the arrow keys. I removed this .egg file and downloaded a newer version and everything is fine.

    Otherwise though it worked well.

  120. Matt M Says:

    Hi Chris,

    I’m attempting to use your 10.5 PPC installer, but it appears that there are two files missing from your iDisk that the Automator installer looks for:

    gfortran-ppc-leopard-bin.tar.gz and PyMC-2.0-py2.5-macosx-10.3-ppc.egg

    I suspect I could use gfortran-4.2.3.dmg (on your iDisk), or the file from http://hpc.sourceforge.net/, but I don’t know what to do about pyMC because they don’t offer a PPC version on their googlecode site (build it from source?). I know you don’t have a PPC machine to test this on, but any help would be appreciated.

  121. Joseph Says:

    RE: superpack.sh

    Looks like ‘dateutil’ has been replaced by ‘DateUtils’. See below.

    -Joseph

                        ...
    

    Reading http://pypi.python.org/simple/dateutil/ Couldn’t find index page for ‘dateutil’ (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for dateutil error: Could not find suitable distribution for Requirement.parse(’dateutil’) Done

  122. chris Says:

    @Matt: I have replaced these missing files — sorry for the inconvenience.

  123. Nicolas Pettiaux Says:

    First, thanks for the easy installer. I use ipython and with the suggestion of Greg Detre, i removed pyreadline*.egg and not I can use the arrows to edit the lines, but I get a strange feedback: often the lines that I want to edit come with about 20 caracters that cannot be modified. As if the readlines tools did not work really as they should. Thanks for any suggestion.

  124. jsalvati Says:

    I too could only get this to work completely by changing “sudo easy_install dateutil” to “sudo easy_install DateUtils”

  125. chris Says:

    The install scripts have been updated; please try them and see if the issues are fixed.

  126. mike Says:

    Hey, just installed Dec 17th package. Late 2008 Macbook Pro. No changes to python other than updating the easy install. IPython error message:

    $ipython -pylab

    Welcome to IPython. I will try to create a personal configuration directory where you can customize many aspects of IPython’s functionality in:

    /Users/sam/.ipython WARNING: Installation error. IPython’s directory was not found.

    Check the following:

    The ipython/IPython directory should be in a directory belonging to your PYTHONPATH environment variable (that is, it should be in a directory belonging to sys.path). You can copy it explicitly there or just link to it.

    IPython will create a minimal default configuration for you.

    Please press to start IPython.

  127. mike Says:

    Hey, this scary message went away on the second run.

  128. jsalvati Says:

    I did not encounter any errors this time.

  129. jsalvati Says:

    I am curious: why don’t you make this script in python? That way other OSs could use it.

  130. Bryan Says:

    I am fairly sure I have my system setup correctly. But when I run the script with either ’sudo sh superpack.sh’ or ’sudo sh superpack_no_fortran.sh’

    I get the following output for all of the packages from drop.io.

    Installing numpy … Searching for numpy Reading http://drop.io/superpack/numpy/ No local packages or download links found for numpy error: Could not find suitable distribution for Requirement.parse(’numpy’)

    This repeats except the changing name of the package it is looking for.

    Any suggestions?

    Thank you, -Bryan

  131. Brad Marston Says:

    I am getting the same errors as Bryan on December 21, except for even more packages: No local packages or download links found for numpy error: Could not find suitable distribution for Requirement.parse(’numpy’) Installing matplotlib … Searching for matplotlib Reading http://drop.io/superpack/matplotlib/ No local packages or download links found for matplotlib error: Could not find suitable distribution for Requirement.parse(’matplotlib’) Installing scipy … Searching for scipy Reading http://drop.io/superpack/scipy/ No local packages or download links found for scipy error: Could not find suitable distribution for Requirement.parse(’scipy’) Installing pymc … Searching for pymc Reading http://drop.io/superpack/pymc/ No local packages or download links found for pymc error: Could not find suitable distribution for Requirement.parse(’pymc’)

    Nose is also missing. iPython gets installed.

  132. chris Says:

    @Brad: I am not able to replicate this one. The packages are certainly there. If you do the following from the command line, does the package install?

    sudo easy_install -Z -i http://drop.io/superpack nose

  133. Brad Marston Says:

    @Chris: The above didn’t work for me (I tried it with numpy, not nose). But I was able to manually download each of the .egg files from the drop.io site, and then install them using easy_install. Everything works fine — thanks.

    Possibly the problem was the following: I was doing the install from my regular user account which doesn’t have administrator access. So I first did a su to the administrator account, and then followed that with sudo easy_install … Perhaps it would have worked had I tried the install directly from the administrator account.

  134. Darren Says:

    Could it be how dropio changed how it stores files… I was able to drag the download link to a “sudo easy_install”… The URL is very long:

    sudo easy_install http://drop.io/download/497e47bc/6ec59189a501a72db3b721cf5db3897866cb3e95/fde052a0-1968-012b-319e-0012799407ec/c6edf1f0-addd-012b-a886-f05e9d3012d0/numpy-1.3.0.dev6149-py2.5-macosx-10.3-i386.egg/numpy_1_3_0_dev6149_py2_5_macosx_10_3_i386.egg

  135. chris Says:

    @Darren: What about adding /asset to the path, for example:

    sudo easy_install -Z -i http://drop.io/superpack/asset numpy

    Let me know if that works. You are right, though — drop.io seems to have changed their file locations.

  136. chris Says:

    That did not appear to have worked, so I have changed the script to hard link to specific files on my university site. This should work, but is a bit more of a hassle to maintain, as I will have to generate new install scripts each time I update the builds. I’m not sure why EasyInstall will not accept the package names, as indicated on their site. Oh well.

    It should work now, in any case.

  137. Aj Says:

    Thanks for the script. I had one problem, DateUtils wouldn’t install:

    Using /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pytz-2009a-py2.6.egg Processing dependencies for pytz Finished processing dependencies for pytz Installing DateUtils Searching for DateUtils Reading http://pypi.python.org/simple/DateUtils/ No local packages or download links found for DateUtils error: Could not find suitable distribution for Requirement.parse(’DateUtils’) Done

    Ive tried downloading the .egg from http://pypi.python.org/simple/DateUtils and running easy_install on that but that didn’t seem to work either.

    Any ideas? Thanks

  138. chris Says:

    @Aj: That may be an issue with the pytz you have installed — I see that its dated 2009 for python 2.6. Maybe try a slightly older version? I have no trouble installing DateUtils from pypi.

  139. Arend Says:

    I am using a PowerPC G3 under MacOS 10.4 and ScipySuperpackInstaller crashes. When I run it from a Terminal window, I get the error

    egel:~/Desktop/ScipySuperpackInstaller.app/Contents/MacOS $ ./ScipySuperpackInstaller dyld: incompatible cpu-subtype Trace/BPT trap

    Any insight would be greatly appreciated!

  140. chris Says:

    @Arend: These packages were built for Intel hardware, not PPC, with the exception of the one link provided above. That build, however, is quite old, and you probably want to build newer ones from scratch.

  141. al Says:

    Chris,

    Install was smooth, thanks!

    I am having issues with matplotlib methods, specifically ‘fill_between’ isn’t found. I’m wondering if that’s a problem on my side or if it has something to do with the superpack installation.

    Thanks again!

  142. chris Says:

    @al: Can you not replicate the following?

    In [1]: from pylab import *

    In [2]: fill_between Out[2]:

    I am using the same matplotlib as is posted.

  143. Brian Gerke Says:

    I’ve had a working version of the superpack installed for some time now, but today I decided to re-install in order to get an updated version of matplotlib. The installer script ran without any apparent problems, but now when I open iPython and do

    from pylab import *

    I get a bus error. The error message from my Mac suggests that the problem might be related to libfreetype.6.dylib

    Any suggestions?

  144. Harry Parker Says:

    I had a problem with IPython not being able to use readline. I had just installed the Scipy Superpack after installing Python 2.5.4 from the python.org site on my Mac Leopard (10.5.6). The installation seemed to go well.

    HOWEVER, the first 2 lines after I typed “ipython” were:

    “WARNING: Readline services not available on this platform. WARNING: The auto-indent feature requires the readline library”

    Researching this error (googling the 1st warning line) I found that Mac’s should not have the pyreadline module installed. That module is only for Windows and screws up readline on a Mac. Macs need readline, but not pyreadline. See, e.g., https://bugs.launchpad.net/ipython/+bug/254023/+activity

    I fixed the problem by removing the pyreadline egg file from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages.

    This fixed my problem.

    Following the instructions for removing an easy_install package found at http://peak.telecommunity.com/DevCenter/EasyInstall , I first executed the command, sudo easy_install -m pyreadline

    Then I renamed the egg file, to pyreadline-1.6.svn.dev_r3066-py2.5.egg-moveAside to make it invisible to the system. IPython then started normally with no warnings.

    I suggest you modify the Superpack to only install readline, not pyreadline.

    Still, with this bug, Superpack is still the easiest way to get SciPy with all the fixin’s installed on a Mac. Thanks.

  145. chris Says:

    @Brian: My builds statically link to freetype, so that is a strange one. Can you send along the entire output of the error, if it is still occurring?

  146. Misha Says:

    Hi, I am trying to install scipy and numpy. However something doesn’t work, as importing both scipy and numpy works fine, but the self tests do not. For example, running scipy.test(1,10) produces

    scipy.test(1,10) Running unit tests for scipy-0.8.0.dev5526-py2.5-macosx-10.3-i386.egg.scipy NumPy version 1.3.0.dev6308 NumPy is installed in /Library/Python/2.5/site-packages/numpy-1.3.0.dev6308-py2.5-macosx-10.3-i386.egg/numpy SciPy version 0.8.0.dev5526 SciPy is installed in /Library/Python/2.5/site-packages/scipy-0.8.0.dev5526-py2.5-macosx-10.3-i386.egg/scipy Python version 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] nose version 0.11.0 Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.5/site-packages/numpy-1.3.0.dev6308-py2.5-macosx-10.3-i386.egg/numpy/testing/nosetester.py”, line 249, in test doctests, coverage) File “/Library/Python/2.5/site-packages/numpy-1.3.0.dev6308-py2.5-macosx-10.3-i386.egg/numpy/testing/nosetester.py”, line 186, in prepare_test_args argv = self._test_argv(label, verbose, extra_argv) File “/Library/Python/2.5/site-packages/numpy-1.3.0.dev6308-py2.5-macosx-10.3-i386.egg/numpy/testing/nosetester.py”, line 139, in _test_argv raise TypeError, ‘Selection label should be a string’ TypeError: Selection label should be a string

    I also tried installing Python 3.0. Importing scipy or numpy under 3.0 doesn’t work (modules not found). I have a feeling that there is a problem with the paths somewhere, but being quite new to python, I can’t figure it out yet. Any help greatly appreciated. Thanks in advance.

  147. chris Says:

    @Misha: I’m going to post updated builds later today. Give those ones a try. I am pretty sure these builds will not work with Python 3.0, so I recommend sticking to 2.5.x.

  148. Adam Says:

    I installed the scipy superpack with no apparently problems. I then tried running

    numpy.test()

    which says it did 0 tests. Similarly I tried

    scipy.test()

    and that also said it did 0 tests. I am running python 2.5.1 on a macintel/10.5.6.

  149. chris Says:

    @Adam: I’m going to blame nose for that one. It appears to have trouble running its tests on packages distributed as .egg files (which the Superpack is). I’ve never been able to crack the problem, and have yet to get a response on the nose board.

  150. sanju Says:

    Do the packaged numpy/scipy use atlas or any other vendor BLAS, LAPACK libraries?

  151. chris Says:

    @sanju: These are built around Apple’s vecLib Framework (part of Apple’s developer toolkit), which includes BLAS and LAPACK.

  152. George Says:

    So Far So Good! Installed but not tested but imports everything OK. Lost the readline thing and up/down arrow history until I removed pyreadline as suggested. I think thats back to normal now. I’ve tried to install all this before without success - so congratulations to the kiwi!

  153. chris Says:

    I’m not a Kiwi, but thanks anyway ;-)

  154. Fernando Pereira Says:

    Any suggestions on how to tweak the script (if possible) to work with Python 2.6.2? I’m writing some code that would really benefit from 2.6 features, but I could not get the script to load everything correctly with that Python version. Thanks!

  155. chris Says:

    @FErnando: Which pieces of the Superpack are not working for 2.6? Is anything getting installed correctly?

  156. Fernando Pereira Says:

    Thanks! I reverted back to 2.5.4 to continue working, but from memory, matplotlib, nose and DateUtils were failing. Numpy installs ok. I’ll try again tonight on another Mac I have at home to get an exact error dump.

  157. Fernando Pereira Says:

    Hum… I got similar error messages on my home computer to what I got on my work computer (both with OS X 10.5.6 and Python 2.6.2). Here are the errors excerpted from the installation output:

    No local packages or download links found for numpy==1.4.0.dev6728 error: Could not find suitable distribution for Requirement.parse(’numpy==1.4.0.dev6728′)

    No local packages or download links found for matplotlib==0.98.6svn error: Could not find suitable distribution for Requirement.parse(’matplotlib==0.98.6svn’)

    No local packages or download links found for scipy==0.8.0.dev5635 error: Could not find suitable distribution for Requirement.parse(’scipy==0.8.0.dev5635′)

    No local packages or download links found for pymc==2.0-20090327 error: Could not find suitable distribution for Requirement.parse(’pymc==2.0-20090327′)

    Downloading http://www.maths.otago.ac.nz/~fonnesbeck/nose-0.11.0.dev_r0-py2.5.egg error: Can’t download http://www.maths.otago.ac.nz/~fonnesbeck/nose-0.11.0.dev_r0-py2.5.egg: 404 Not Found I

    But somehow, what was installed works so far. Weird, I’ll retry on the other computer to see what happens.

  158. Fernando Pereira Says:

    Weirder still. Reinstalled on my other computer, seems to work now, even with the same error messages as in my previous message. I’m not complaining ;)

  159. Christian Mauceri Says:

    It worked like a charm! Thanks a lot, I spent two hours in trying to have scipy and matplotlib working on my mac mini using other posts…

  160. Sylvain Says:

    Hello!

    It seemed to work very well for me until i tried to use the matplotlib library. I have this message and i don’t know what to do :

    “dlopen(/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-i386.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-i386.egg/matplotlib/ft2font.so Reason: image not found”

    If anybody can help that would be great!

    Thank you.

  161. C Says:

    The pyreadline installed with this script does not work for me, as many others have pointed out is the case for them. I recommend deleting the pyreadline .egg and installing another redline with

    sudo easy_install readline

    This is from http://ipython.scipy.org/moin/InstallationOSXLeopard

  162. chris Says:

    @C: I’ve changed the readline install in the current script. Give it a try.

  163. Javier Castellanos Says:

    Great script!!! I tried everything for installing scipy on Leopard and your script was definitively the best way to do it.

    Thanks!

  164. shin Says:

    This is really great and easy tool for installation. I cannot live without superpack anymore! However, I’m also interested in OS X Snow Leopard, so do you have any plan to open superpack for Snow Leopard soon?

    Thanks :-)

  165. admin Says:

    I will be building the Superpack for 10.6 as soon as it is released and I get it on my system.

  166. Andre Says:

    Hi Chris,

    Thanks for putting this together - I just downloaded the script tonight, and started installing. I do have some questions. Also, I am completely new to Scipy, Numpy, MatplotLib, iPython, and PyMC - however, I love Python, and am working to rid myself of my Mathematica habits….

    (I am running Mac OSX 10.5.6 and Python 2.6.2)

    1 - like Fernando, May 1, 2009, I get the following error messages when I run the script (as su)

    error: Could not find suitable distribution for Requirement.parse(’numpy==1.4.0.dev7303′)

    error: Could not find suitable distribution for Requirement.parse(’matplotlib==0.98.6svn’)

    error: Could not find suitable distribution for Requirement.parse(’scipy==0.8.0.dev5838′)

    error: Could not find suitable distribution for Requirement.parse(’pymc==2.0-20090815′)

    error: Could not find suitable distribution for Requirement.parse(’nose==0.11.0.dev-r0′)

    However, also like Fernando, when I launch Python, and then import numpy, scipy and matplotlib - i get no complaints, and things seem to work (I can make plots!).

    But then I notice that on the plots, what should be minus signs (on the axes) are plotted as open boxes? However, this is only in the python window - when I print the file and then open, the minus signs appear correctly - so perhaps just a weird plotting problem…

    Not sure if there is actually any problem. As I learn how to use all this, if I come across any actual problems, I will update.

    Thanks again.

  167. marco Says:

    tnx a lot man u made my day :D

  168. Marco Coisson Says:

    Hi, I’m new to scipy and still learning it. I installed everything on Leopard with scipy superpack (my compliments for this very handy script), but I’m having problems with Snow Leopard: it seems that scipy superpack installs all the libraries in 32 bit mode, whereas python by default runs in 64 bit mode. If I tell python to run in 32 bit mode, upon loading pylab (from pylab import *) all I get is a bus error of python.

    I’m just sending a feedback, since I haven’t found yet on the web any news on how to successfully install all scipy stuff under Snow Leopard.

    Thank you!

  169. eddy Says:

    I have checked your site everyday for a new release of scipy for Snow Leopard. I tried several times and failed for so many dependancies it requires….

    Please release one asap ~~thank you man.

  170. chris Says:

    @eddy There will not be a Snow Leopard version available until later in the month. I am currently travelling and have not yet moved to 10.6.

  171. Jamie Says:

    Hi there, I was just wondering if it’s possible to install the superpack for my non-default python. I have it set up for 2.6 which is my default python, but I was wondering I could set it up for 2.5 (non default version) using the installer script.

    Thanks much for the help.

  172. alexander Says:

    Thanks for the script. works like a charm!

  173. Sara Says:

    Thank you very much … I had spent a lot of time trying to setup matplotlib on Leopard, but facing lots of problems. This was really helpful.

    Just one quick question, while the script was running I got the following error:

    Installing matplotlib … . . Adding matplotlib 0.98.6svn to easy-install.pth file Installed /Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg . . . Processing dependencies for matplotlib==0.98.6svn . . . No local packages or download links found for matplotlib==0.98.6svn error: Could not find suitable distribution for Requirement.parse(’matplotlib==0.98.6svn’) Installing scipy … . . .

    but I could import matplotlib modules in python. Is the error anything important?

    Many thanks again

  174. chris Says:

    @Sara: It appears that you already had a functioning version of Matplotlib in your Python library, so you should be good to go.

  175. Sara Says:

    Thank you Chris

  176. Trent Says:

    Any word on the snow leopard version?

  177. chris Says:

    Its waiting on me getting my copy of 10.6. Soon, very soon. It will be the first real work that I do when I have upgraded.

  178. Theo Says:

    Hello, I am getting all sorts of 404 errors trying to install the superpack. A lot of the required packages seem to be offline. Any solutions would be greatly appreciated.

  179. chris Says:

    @Theo

    You caught me in the middle of an update. Try again later today, and you will have a new build to install! Dont forget to grab a new script. Give me a few hours though.

  180. Theo Says:

    @chris

    I tried again and got it all wonderfully with the new script, thank you very much. Works like a charm thus far

  181. Francesco Says:

    Hi. I am getting many errors trying to import pylab:

    import pylab Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/pylab.py”, line 1, in from matplotlib.pylab import * File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/pylab.py”, line 206, in from matplotlib import mpl # pulls in most modules File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/mpl.py”, line 2, in from matplotlib import axis File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py”, line 10, in import matplotlib.font_manager as font_manager File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/font_manager.py”, line 52, in from matplotlib import ft2font ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so Reason: image not found

    import scipy and import matplotlib give no errors, but any function (like “plot”) doesn’t work.

  182. Sam Says:

    Thanks so much for all your effort! I installed today on Snow Leopard, and so far have only found on hitch: When I tried to import matplotlib.pyplot, I was getting a an error “Library not loaded: /usr/local/lib/libfreetype.6.dylib” with the reason: “Reason: no suitable image found.” I did, however, have the file libfreetype.6.dylib in the directory /opt/local/lib/, so I added a symlink to there from /usr/local/lib/, and so far it works! Thanks again!

  183. chris Says:

    @Francesco: Thanks for the bug report. I have limited machines to test on, so the first few iterations of the 10.6 builds may be a bit rough. I will try and fix this today.

  184. chris Says:

    I think I have fixed the dynamic linking problem with matplotlib. Delete the old version first if you can, just to be sure, before running the script again.

  185. Jonas Says:

    thanks for the effort. I received the following error when importing numpy or scipy: ValueError: array is too big. it seems to come from /numpy/core/numerictypes.py but I don’t know how solve it. any idea?

  186. chris Says:

    @Jonas It sounds like you are using 32-bit Python. For these builds are meant to be used with Apple’s Python 2.6.1 that ships on Snow Leopard. Can you confirm which version of Python you are using?

  187. Francisco Says:

    Hey, i solved Francesco problem just by :

    sudo su cd /usr/local mkdir lib (/usr/local/lib did not exist in my fresh install of Snow Leopard) ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/

    then restarted the shell and i have no error messages when importing pylab:

    Last login: Wed Oct 21 21:49:41 on ttys002 ortega@talca ~$ python Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.

    import numpy import scipy import pylab

    i hope it helps…

    thanks a lot for your coding!!!. Francisco.

  188. jonas Says:

    I think it is 2.6.1. this is the message I get when starting ipython

    Leopard libedit detected. Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) Type “copyright”, “credits” or “license” for more information.

  189. amit Says:

    I had the same problem as Francisco and as mentioned above but /usr/local/lib was present in my system and linking by ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/

    solved the problem! and I even tested some of my old programs which use numpy, scipy and pylab to generate some plots.

    I am not sure if the problem was created by my playing around with macpython, anyways now I am back to only the default 64 bit python 2.6.1) with the scipy superpack working its magic.

    great work@chris

  190. Guido Says:

    Hi Chris. I was wondering if you know why I might be getting this error (below). I have being using matplotlib 0.99 and numpy with Python 2.6.2 and ActivePython 2.6.2.2 without problems. Today I wanted to add Scipy to use its stats module. I found your Scipy Superpack for OSX 10.6 and successfully installed it. But now, when I try importing a numpy, scipy or matplotlib module I get the following error:

    File “”, line 1, in File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/init.py”, line 78, in from numpy import show_config as show_numpy_config File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/init.py”, line 130, in import add_newdocs File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py”, line 9, in from lib import add_newdoc File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/lib/init.py”, line 4, in from type_check import * File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py”, line 8, in import numpy.core.numeric as _nx File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/core/init.py”, line 8, in import numerictypes as nt File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/core/numerictypes.py”, line 737, in _typestr[key] = empty((1,),key).dtype.str[1:] ValueError: array is too big.

    Your help is VERY much appreciated!

    Thanks,

    • Guido
  191. jonas Says:

    Hi again. I’ve solved the problem by setting python to 64 bit:

    defaults write com.apple.versioner.python Prefer-32-Bit -bool no

    I hope this can be helpful for others with the same problem. Thanks chris for guiding me in the right direction.

  192. Guido Says:

    Thanks Jonas. But even after setting:

    defaults write com.apple.versioner.python Prefer-32-Bit -bool no

    When I loaded python back again, the error was still there. I’m using Python 2.6.3 instead, but I don’t think that makes any difference.

    I imported the platform module to check if python was running in 64bits, and this is what I get:

    platform.architecture() (’32bit’, ”)

    I guess, this means I didn’t change the setting correctly?

    • Guido
  193. jonas Says:

    @Guido: That is strange. do you have multiple versions of python on your system? There are probably other ways to change to 64 bit, but I’m not sure how. Maybe you should try to get back to the default install, 2.6,1.

  194. Marco Coïsson Says:

    I’ve just tried the new script for Snow Leopard, and it works like a charm! I only had to link the libfreetype library, as Francisco said a few comments above:

    ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/

    Thank you very much for your job! Great work. Marco

  195. Robert Mutel Says:

    After hours of frustration trying to rebuild numpy/scipy/matplotlib etc follwoing the Snow Leopard upgrade, I discovered superpack, and voila - it worked! (After the freetype symbolic link fix). I have forwarded this miracle to my graduate students, who also use scientific python in their research. Many thanks Chris!

  196. MarkS Says:

    Installer worked great. However the is a problem with long lines in ipython. Is any one else having this? (try typing a long line in ipython, and recall it with up-arrow). I would guess it’s the lidedit vs readline problem (again). Nevertheless, thank you for the effort!

  197. Michael Gustafsson Says:

    Hi, I followed your instruction, but scipy is not working. Missing library is/usr/local/lib/libgfortran.2.dylib

    It is not included in the gfortran distribution that is downloaded. Only /usr/local/lib/libgfortran.3.dylib is there.

    Example of python error is: “ImportError: dlopen(/Library/Python/2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Library/Python/2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so Reason: image not found”

    Extra info: Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin gfortran –version GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5646)

    Thanks for all help in solving the problem!

  198. MarkS Says:

    Regarding ipython and readline: readline failed on me with:

    (…) i686-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory i686-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory powerpc-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory powerpc-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory i686-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory i686-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory lipo: can’t figure out the architecture type of: /var/tmp//ccMkPqwk.out

    so the thing to do is …

        cd a_temp_directory
    easy_install -e -b a_temp_directory readline
    cd a_temp_directory/readline/
    nano rl/build.sh      # comment the first 2 lines that start with "export..."
    python setup.py build
    sudo python setup.py install
    

    … and for freetype:

        sudo ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/
    

    all is ok now :)

  199. Ricardo Says:

    Hi.

    Thank you for this distro!

    I’m having the same error some people have reported:

    In [1]: import matplotlib

    In [2]: import pylab

    ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so Reason: image not found

    I’m running a recently installed Snow Leopard 10.6.1

    I have tried linking /usr/local/lib/libfreetype.6.dylib with existing copies of the file in some other folders, but never works. It complains about the architecture and stuff. Maybe it’s the 64-bit..

    I even re-installed X-Code with 10.4u SDK just to be sure, but still..

    I’m also having problems with the lines (is it readline?). Everytime I try to go back and forth in the command history in IPython 0.10 it all gets screwed up..

    Thanks!

  200. Ricardo Says:

    Nevermind, the previous comment by MarkS solves it.

  201. Martin Says:

    Thanks a million for the script, Chris. It works like a charm! And for the first time also scipy.weave works for me. Btw, would you have a repository of other “eggs” you have precompiled for Snow Leopard and Python and you use or just the ones included in the script?

  202. chris Says:

    As some of you have realised, I am really quite useless at static linking libraries properly. I will try to get it right next time, with libfreetype particularly. Thanks for your patience.

  203. John Says:

    I am still getting the’array is too big’ error (like Guido above) after using the install script and trying to import anything that depends on numpy. I am running Python 2.6.1 on OS 10.6.1 on Macbook Pro Core Duo machine. After running the script (everything seems to work fine w/out errors) and starting up ipython, platform.architecture() returns (’64bit,”). Is anyone else still having this problem?

  204. Steve Says:

    I am still having the ‘array is too big’ error like Guido and John. I was running 2.6.4 but reverted to 2.6.1 that came with snow leopard .. still an issue. Any news?

  205. Hugo Silva Says:

    I’m having the same problem with numpy:

    python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg

    ValueError: array is too big.

    I’m running Python 2.6.4 and already tried the fixes suggested above still without success.

    Has anyone been able to find the root cause and fix?

  206. John Says:

    I’m still unable to compile this, and its becoming annoying. Having to run my analysis on a remote ubuntu computer is not my ideal environment. Still getting ‘array is too big’ error on import of numpy-1.4dev#### to python 2.6.1 on snow leopard. I’ve included a few lines from the output when compiling numpy from svn source that seem to point to a problem:

    … compile options: ‘-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c’ gcc-4.2: _configtest.c _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype lipo: can’t open input file: /var/tmp//ccv6Sb0q.out (No such file or directory) _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype lipo: can’t open input file: /var/tmp//ccv6Sb0q.out (No such file or directory) C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe

    compile options: ‘-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c’ gcc-4.2: _configtest.c _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccnDXHkx.out (No such file or directory) _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccnDXHkx.out (No such file or directory) C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe

    compile options: ‘-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c’ gcc-4.2: _configtest.c _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccX7uS1x.out (No such file or directory) _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccX7uS1x.out (No such file or directory) C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe

    compile options: ‘-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c’ gcc-4.2: _configtest.c _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccfhtxER.out (No such file or directory) _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative _configtest.c:6: warning: function declaration isn’t a prototype _configtest.c: In function ‘main’: _configtest.c:7: error: size of array ‘test_array’ is negative lipo: can’t open input file: /var/tmp//ccfhtxER.out (No such file or directory) C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe ….

    lots of ‘error: size of array…’ Perhaps this is part of the problem??

    thanks for any help!

  207. Claire Says:

    Thank you for this! I spent a long time trying to figure out how to install scipy before finding your site. It made it easy.

  208. chris Says:

    Hi everyone. I am going to try and produce new builds today. I assumed the “ValueError: array is too big” problem was related to not having 64-bit Python, but apparently some folks on 64-bit are still getting this. No solution yet — I have not been able to replicate the problem. Stay tuned.

  209. Tristan Says:

    I just installed the superpack because I need scipy. That’s works very easily (that’s great).

    Unfortunately, after a from pylab import * statement, the “load” function of the pylab module seems to be overloaded by the numpy one; that was not the case with my previous installation of numpy/pylab. What should I do ? Of course, my codes don’t work anymore…

    Can anyone suggest a fix ?

  210. chris Says:

    Here is the numpy bug report: http://projects.scipy.org/numpy/ticket/1221

  211. Bob H Says:

    Am confused about what version I should download. I have OSX 10.5.8 on an i386 Mac. At http://www.scipy.org/Download it says “Make sure you are using OSX 10.5 Leopard’s preinstalled Python 2.5.1…” and “Download the SciPy Superpack for Python 2.5″ with the latter being a link to this macinscience page.

    I am using Python 2.5.1 (though it was NOT preinstalled with my OSX 10.5; I had to install it, from python.org/downloads/releases/2.5.1, python-2.5.1-macosx.dmg). But the only download here that looks close to applicable is “Scipy Superpack for OSX 10.5″, but I am concerned about the admonishment that “this package was built against Enthought Python 4.3.”

    Is THAT Superpack for OSX 10.5 the right one for me, or would I just be wasting my time if I installed it?

    Thanks for any help

  212. chris Says:

    @Bob: That is the one you want, yes. I recommend Enthought Python (which actually is 2.5.1, its just the Enthought version numbering that is 4.3 — confusing, I know), but others have had success running it on non-Enthought Python.

  213. Bob H Says:

    Thanks, Chris. I will give it a shot in the morning.

  214. Bob H Says:

    Am having quite a bit of trouble with this installation and am hoping someone can point me in the right direction. I am trying the Scipy Superpack for OSX 10.5 script, and the failure point is while “installing ez_setup”. (more details below) It seems to be reporting that .pth files are not supported.

    I am using OSX 10.5.8 on an i386 Mac, and recently installed Python 2.5.1 (from python.org/downloads/releases/2.5.1, python-2.5.1-macosx.dmg). “which python” says “/Library/Frameworks/Python.framework/Versions/Current/bin/python” and “python -V” says “Python 2.5.1″.

    I am running the Superpack install script logged in as an admin, and am running a bash shell. PYTHONPATH is /Users/me/py/scripts:/Users/me/py/lib/python, where “me” is my login name. My home directory contains ~/.pydistutils.cfg which looks like this: [install] install_lib = ~/py/lib/python install_scripts = ~/py/scripts My currect directory when I execute the script is /Users/me/py/lib/python, and that directory contains site.py. There are existing .pth files in this directory for other packages, and running python from the shell I am able to import those packages (which seems to suggest that the directory DOES support .pth files). Other than the recent install of python 2.5.1, this is a python setup I have been using for a couple years, but I do not know if this problem is the result of installing 2.5.1, or of something else.

    When I run the Superpack install script (skipping gfortran), I see (roughly) this report: installing ez_setup downloading … setuptools-0.6c11-py2.5.egg TEST FAILED: /Users/me/py/lib/python does NOT support .pth files error: bad install directory or PYTHONPATH

    You are attempting to install a package to a directory that is not on
    PTYHONPATH and which Python does not read ".pth" files from.  The
    installation directory you specified ... was /Users/me/py/lib/python
    and your PYTHONPATH environment variable currently contains ''.
    

    It’s not clear to me why it thinks my PYTHONPATH is empty. I have tried walking through ez_setup.py (and also site.py) but am not able to make complete sense of it.

    After looking through some of the history on this page, I decided to try skipping the install of ez_setup, and attempted the easy_install of the numpy egg manually. This also fails– when easy_install tries to import pkg_resources, it fails. However, if I enter python manually and import pkg_resources, it succeeds.

    My best guess is that the “ez”/”easy” stuff is confused about my paths. But I’m at a total loss as to where to hunt next.

    Any help is appreciated.

  215. Bob H Says:

    OK, well I am trying to step through ez_setup.py manually to see where the failure occurs. I think it fails to download setuptools-0.6c11-py2.5.egg, and the error message about .pth files may be a red herring. But I cannot find where that error message is coming from. It doesn’t appear to be in ez_setup.py. Anyone know where it comes from?

  216. Bob H Says:

    OK, I’ve gotten a little farther. I THINK I have succesfully performed ez_setup.py, but the next step, easy_installing numpy fails (info on that failure after I describe what was going on with ez_install).

    The error message from ez_install is indeed a red herring but not for the reason I thought. ez_install is attempting to load the setuptools egg and since that egg file didn’t exist on my machine after the failure, I thought it was failing to download it. That is not the case. The script automatically discards the egg file after use.

    The real problem seems to be that previous versions of the files it is attempting to install were in the way. As you may recall my lib directory is /Users/me/py/lib/python and my scripts path is /Users/me/py/scripts. In the former there existed a file named easy-install.pth (creation date May). Stepping through ez_setup.py manually, when it calls the newly downloaded egg’s main(), if that file exists, I got this error:

    Processing setuptools-0.6c11-py2.5.egg Adding setuptools 0.6c11 to easy-install.pth file error: /Users/me/py/lib/python/easy-install.pth: Permission denied

    I note in passing that that file’s owner was a different user (a user that has no admin privileges), and that previous attempts to do this installation as that user didn’t succeed either.

    Anyway, I deleted the easy-install.pth and tried calling the egg’s main again. This time it got farther but complained thusly:

    Processing setuptools-0.6c11-py2.5.egg Adding setuptools 0.6c11 to easy-install.pth file Installing easy_install script to /Users/me/py/scripts error: /Users/me/py/scripts/easy_install: Permission denied

    Sure enough I had files named easy_install (and easy_install-2.4) in that directory. So I deleted them actually I just renamed them).

    Now calling the egg’s main I get this report:

    Processing setuptools-0.6c11-py2.5.egg setuptools 0.6c11 is already the active version in easy-install.pth Installing easy_install script to /Users/me/py/scripts Installing easy_install-2.5 script to /Users/me/py/scripts

    Installed /Users/Shared/py/lib/python/setuptools-0.6c11-py2.5.egg Processing dependencies for setuptools==0.6c11 Finished processing dependencies for setuptools==0.6c11

    At that point I figured I had setuptools installed successfully. But I deleted the three installed files (easy-install.pth, easy-install, and easy-install-2.5) and attempted to run the ez_install script again. And it failed the same way it did before. So I went back through the whole process by hand a second time.

    At this point I was full of vigor (to borrow a line from Dial M for Murder) and ready to try installing numpy. But to avoid losing this message I’ll post it now and then start another. Stay tuned

  217. Bob H Says:

    (sorry about the formatting problems– the blog software is ignoring my spacing)

    So I tried installing numpy, using the command from the “Scipy Superpack for OSX 10.5″ script: sudo easy_install …py2.5-macosx-10.3-fat.egg . And it fails with File “/Users/me/py/scripts/easy_install”, line 5, in from pkg_resources import load_entry_point I made my own version of easy_install and added a line that shows me my python path stuff is fine at the point it is trying to import. But I also can’t find any file named pkg_resources on my machine.

    So my next question is, where should I expect to find pkg_resources? Is it a standard part of the python installation, or was it supposed to have been installed as part of the ez_setup stuff?

  218. chris Says:

    @Bob: EasyInstall is not supposed to cause these sorts of problems (hence the word “Easy” in the name). I’m not an expert on the inner workings, so I recommend posting your issue to the distutils mailing list (http://mail.python.org/pipermail/distutils-sig/). They will be better able to help you troubleshoot than I will, since I cannot replicate your bug.

  219. Bob H Says:

    Thanks. That’s really all I was after, for someone to point me in the right direction.

  220. Bob H Says:

    Howdy, Chris,

    It appears the magic missing ingredient was to get rid of “sudo” in your script, when running easy_install. When I do that it appears to install ok. By which I mean it doesn’t complain and if I now go into the python manual shell and do, e.g., import scipy, it succeeds.

    I’d like to run some simple test, though, to see if the installation really succeeded or not. I’m trying to hunt down a simple test (like maybe solving am order-3 linear equation). But if you know of some test suite, could you point me at it?

    Thanks, Bob H

  221. chris Says:

    @Bob: Aha! That makes sense. Most users will be installing into the Python framework, so sudo will be required. I will try and make the installer a little more generic next time.

    Scipy and numpy come with their own unit tests:

    import scipy scipy.test()

  222. Bob H Says:

    So as I understand it, using sudo means that I was running as root. And since I never set up pydistutils.cfg for the root user, the install stuff wasn’t able to find the right paths.

    But, thinking this through, why would sudo ever be used for this installation on a mac? A non-admin user on a mac doesn’t normally have sudo privileges (unless the sudoers file has been changed), so the install has to be performed by an admin account (and I was running as an admin). But an admin account already has the privileges needed to write to the Python framework. So why would sudo be necessary?

  223. chris Says:

    @Bob: Generally, Python packages are not stored in a user’s directory, but rather somewhere in /Library (e.g. /Library/Frameworks/Python.framework/), so that they are available system-wide. Hence, root privileges are required to install them.

  224. Bob H Says:

    @chris: But my point was, an admin user already has the privileges required to write to /Library and what’s underneath it. Am I wrong? I tried writing to the first few levels as an admin and had no problem.

  225. chris Says:

    @Bob: No, on OSX admin users still have to provide their password to write to (most) directories owned by root. This keeps users from accidentally changing/deleting files. All admin user means is that you are on the sudoers list.

  226. Bob H Says:

    Ahhh, I see. I didn’t try my experiments deep enough into that directory tree. Kind of surprising that the whole /Library tree isn’t root-owned.

  227. Ted P Says:

    I am using the datetime module in python and after installing the scipy superpack this line in my code:

    date=datetime.date.today()

    throws the following error: AttributeError: type object ‘numpy.datetime64′ has no attribute ‘date’

    i am wondering if anyone else has seen this, if so what do I do? there seems to be little documentation on Datetime64 for numpy. . .

  228. Robert Says:

    I downloaded the superpack onto a virgin MacPro w/ Snow Leopard Server. The install went fine, but I’m not getting what I was hoping for. Two main, apparent, issues at this point.

    1. scipy.test() fails all tests. ERROR: Failure: ImportError (dlopen(/Library/Python/2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/fftpack/_fftpack.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Library/Python/2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/fftpack/_fftpack.so Reason: image not found)

    2. I’m not sure how to get matplotlib working.

      import matplotlib from matplotlib import pylab ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so Reason: image not found

    Not sure how my environment differs from the one you used to build. Mine is virgin, as I said, with the Apple-provided python 2.6.1.

    Do you have instructions for building? Maybe I should try that. I tried installing gfortran from att myself, but that didn’t help. The lib files go into /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/, but there isn’t a libgfortran.2.dylib file anywhere on my machine.

    I wonder what’s different for me from all those who’ve had great success.

  229. AndrewG Says:

    The Superpack is great! I spent hours yesterday trying to get all of these things to work myself. I was this close to just giving up when I discovered this site. Thank you!

    But I’m not quite running 100% yet. I’m using the latest Snow Leopard on a MacBook Pro. I have the built-in Python installation, but yesterday I also installed ActivePython, as well as easyinstall, NumPy, SciPy, and matplotlib (but the last two never installed successfully). The Superpack installed cleanly and beautifully, and it brought joy to my heart.

    My problem though is using the plot package. I admit I’m a newbie. When I start ipython (with -pylab) I get the message about matplotlib integration, suggesting I type a few lines manually:

    import matplotlib
    matplotlib.interactive(True)
    matplotlib.use('wxagg')  # adjust for your backend
    %gui -a wx               # adjust for your GUI
    from matplotlib import pyplot as plt
    

    I tried entering these as-is, but when I typed in the gui line I got a raft of errors (attached below). I suspect I don’t have either the right “backend”, or GUI, or both. Can anyone tell me how I can get matplotlib working with whatever backend and GUI would be living on my system by default? I don’t know if it’s relevant, but I’m running ipython in an iTerm window.

    Alternatively, the message says I could run an “older version of IPython”. If that’s the only way to make this work I’ll give that a shot (if someone can tell me how!), but my experience of trying to install these packages manually has been very frustrating and I’d like to avoid that if possible.

    My goal is to process data in python and then draw plots to show me what I’ve produced; using the most feature-rich versions of software is secondary to that goal.

    Thank you again to everyone involved for the creation and evolution of this wonderful Superpack!

    Here’s that I get when I try the lines as suggested when I start IPython:

    In [6]: import matplotlib

    In [7]: matplotlib.interactive(True)

    In [8]: matplotlib.use(’wxagg’)

    In [9]: %gui -a wx

    Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/core/iplib.py”, line 1606, in magic return result File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/contextlib.py”, line 34, in exit self.gen.throw(type, value, traceback) File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/contextlib.py”, line 113, in nested yield vars File “/Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/core/iplib.py”, line 1605, in magic result = fn(magic_args) File “/Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/core/magic.py”, line 3533, in magic_gui return inputhook.enable_wx(app) File “/Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/lib/inputhook.py”, line 382, in enable_wx from IPython.lib.inputhookwx import inputhook_wx File “/Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/lib/inputhookwx.py”, line 26, in import wx File “/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/init.py”, line 45, in File “/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/core.py”, line 4, in ImportError: /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.so: no appropriate 64-bit architecture (see “man python” for running in 32-bit mode)

    In [10]:

  230. AndrewG Says:

    (update to my previous comment) I did some more searching and it seems that substituting ‘tk’ for ‘wx’ should have done the trick. But not quite. Here’s the output from that experiment. As I mentioned in my previous post, I repeatedly tried installing NumPy, SciPy, matplotlib, etc. myself yesterday, using a variety of techniques (e.g., running the built-in installer, running an egg file, even trying to recompile each package) so I may have accidentally over-written or mangled something along the way.

    In [1]: import matplotlib

    In [2]: matplotlib.interactive(True)

    In [3]: matplotlib.use(’tkagg’)

    In [4]: %gui -a tk Out[4]:

    In [5]: 2009-11-19 12:19:26.069 Python[7442:d07] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find: /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper python: OpenScripting.framework - scripting addition “/Library/ScriptingAdditions/Adobe Unit Types.osax” declares no loadable handlers.

    In [6]: from matplotlib import pyplot as plt

    Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/pyplot.py”, line 7, in from matplotlib.figure import Figure, figaspect File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/figure.py”, line 18, in from axes import Axes, SubplotBase, subplot_class_factory File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py”, line 12, in import matplotlib.axis as maxis File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py”, line 10, in import matplotlib.font_manager as font_manager File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/font_manager.py”, line 52, in from matplotlib import ft2font ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so Reason: image not found

    In [7]:

  231. Darren Dale Says:

    I think I got vtk and mayavi working:

    I downloaded vtk-5.4.2, unzipped it, and made a build directory (vtkbuild) next to the resulting VTK directory. Then I cd into vtkbuild and run “cmake ../VTK”. Next, I edited CMakeCache.txt (in vtkbuild) and set:

    //Build Verdict with shared libraries. BUILD_SHARED_LIBS:BOOL=ON

    //Build architectures for OSX CMAKE_OSX_ARCHITECTURES:STRING=x86_64

    //Minimum OS X version to target for deployment (at runtime); newer // APIs weak linked. Set to empty string for default value. CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6

    //Build shared libraries with rpath. This makes it easy to run // executables from the build tree when using shared libraries, // but removes install support. VTK_USE_RPATH:BOOL=ON

    //Wrap VTK classes into the Python language. VTK_WRAP_PYTHON:BOOL=ON

    //Arguments passed to “python setup.py install …” during installation. VTK_PYTHON_SETUP_ARGS:STRING=

    Next, I ran “cmake ../VTK” again. Next, I ran “export MACOSX_DEPLOYMENT_TARGET=10.6″, but this may not have been necessary. Run “make -j 2″ Run “sudo make install”

    After that I was able to install Mayavi in the usual way.

  232. Robert Says:

    I found my problem with ‘Library not loaded: /usr/local/lib/libgfortran.2.dylib’. I let the superpack download the gfortran compiler. That grabs gfortran-42-5646 from the att site. For some reason, that package doesn’t provide the expected library. So I decided to try an older version, the 4.2.3 binary. Once I installed that, I no longer got the ‘Library not loaded” error.

    To get matplotlib working, I had to sudo ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib, as pointed out at http://blog.hyperjeff.net/?p=160.

    So, seems I’ve gotten somewhere.

    AndrewG, try putting in the link for libfreetype and see if that fixes your problem. I haven’t tried too much, yet, but I was able to open a plot window with pylab.

  233. Michael Says:

    Has there been any progress on the “array is too big” error?

    On trying to import anything from scipy or numpy I get:

    Traceback (most recent call last): File “”, line 1, in File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.8.0.dev5975-py2.6-macosx-10.6-universal.egg/scipy/init.py”, line 78, in from numpy import show_config as show_numpy_config File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/init.py”, line 130, in import add_newdocs File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py”, line 9, in from lib import add_newdoc File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/lib/init.py”, line 4, in from type_check import * File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py”, line 8, in import numpy.core.numeric as _nx File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/core/init.py”, line 8, in import numerictypes as nt File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/core/numerictypes.py”, line 737, in _typestr[key] = empty((1,),key).dtype.str[1:] ValueError: array is too big.

    I have tried everything. Building from source (following the instructions on the hyperjeff blog) led to a bunch of other errors (though everything does actually build), and installing the superpack following the above instructions leads to this error. I have yet to get anything working in scipy on Snow Leopard, so any help would be greatly appreciated.

    Thanks!

  234. kc Says:

    A newb question. How can I configure the nose tester not to skip all the test? I tried numpy.test(’full’) without success. Here’s some example output.

    $ numpy.test(’1′, ‘10′) … nose.selector: INFO: /Library/Python/2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/tests/test_ctypeslib.py is executable; skipped

    Ran 0 tests in 0.043s

    OK Running unit tests for numpy NumPy version 1.4.0.dev7542 NumPy is installed in /Library/Python/2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy Python version 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] nose version 0.11.0 Out[24]:

  235. Ari Says:

    Robert’s solution to ‘Library not loaded: /usr/local/lib/libgfortran.2.dylib’ worked for me. I installed the gfortran 4.2.3 binary from http://r.research.att.com/gfortran-4.2.3.dmg, and the error went away.

  236. Matt S Says:

    Hi, Wondering if someone can help me. I get this error:

    ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so Reason: no suitable image found. Did find: /usr/local/lib/libfreetype.6.dylib: mach-o, but wrong architecture /usr/local/lib/libfreetype.6.dylib: mach-o, but wrong architecture

    I have tried sudo ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib

    for which it says:

    ln: /usr/local/lib/libfreetype.6.dylib: File exists

    Does the superpack install freetype? I installed it myself a while ago for something else so maybe they are conflicting?

    cheers, Matt

  237. Z Says:

    The error when trying to use numpy from a 32 bit python shell

    File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542-py2.6-macosx-10.6-universal.egg/numpy/core/numerictypes.py”, line 737, in _typestr[key] = empty((1,),key).dtype.str[1:] ValueError: array is too big.

    has been fixed two weeks ago “Should be fixed in r7793 in the trunk (backported to 1.4.x branch as well for 1.4.0).” http://projects.scipy.org/numpy/ticket/1221

    Can you please recompile the build of numpy used in the superpack as this was not a minor or annoyance.

  238. chris Says:

    Hi Folks,

    Sorry for being late in updating the builds. I have run into a problem with recent Numpy development code that prevents me from building viable packages on 10.6. I am seeking some assistance with the problem, and hope to get it fixed quickly. Stay tuned.

  239. David Allison Says:

    Is there a way we can sign up to receive updates when the builds of the various components or the Superpack script are updated?

    Thanks, David

  240. chris Says:

    @David: Thats a really good idea — perhaps an RSS feed. My medium-term plan is to move all this to another site (maybe around Xmas?), so that might be an opportunity to do a better job of distributing the Superpack.

  241. Chris S. Says:

    Cheers ! I installed the nice pack, but when I try to import for example numpy I get the error message displayed on the bottom of this post. I think I installed a 32-Bit Version of 2.6.2 instead of keeping the 64-Bit Version that comes with Snow Leopard. Any hints where I can get a 64-Bit Version of 2.6.4 or how to downgrade back to 2.6.1? I have no clue on how to compile the source files … Or do you think it is a different problem? Thanks in advance, Have a good one, C

    Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) [GCC 4.0.1 (Apple Computer, Inc. build 5250)]

    py2.6-macosx-10.6-universal.egg/numpy/core/numerictypes.py”, line 737, in _typestr[key] = empty((1,),key).dtype.str[1:] ValueError: array is too big.

    10.6.2 OS X Snow Leopard

  242. chris Says:

    I’ve just posted an updated version that should take care of some of the issues. I’m still not able to build more recent revs of numpy, but I back-ported the fix for the ValueError some have been getting. The result of this “fix” however, is that SciPy can no longer be built, so I have disabled its installation for now. Until the Numpy folks are able to give me a real solution for my Numpy build woes, this tradeoff is necessary.

    I also tried again to remove dynamic linking to gfortran libs. Give it a whirl.

  243. chris Says:

    Correction: instead of leaving Scipy out altogether, I am simply installing the version from the last build. It appears to work.

  244. Chris S. Says:

    Thanks Chris! Would check it out, but the download link seems to be dead… Thanks again! C

  245. Chris S. Says:

    Thanks Chris! Would check it out, but the download link seems to be dead… Thanks again! C

  246. chris Says:

    Try it now. I have had to revert to older versions of both Numpy and Scipy until my build issues are resulved.

  247. James T. Says:

    Chris,

    It seems there is a broken link to matplotlib when I installed the package:

    “Installing matplotlib … Downloading http://www.maths.otago.ac.nz/~fonnesbeck/matplotlib-1.0.svn_r8034-py2.6-macosx-10.6-universal.egg error: Can’t download http://www.maths.otago.ac.nz/~fonnesbeck/matplotlib-1.0.svn_r8034-py2.6-macosx-10.6-universal.egg: 404 Not Found”

    as a result I have all other things in the package installed but matplotlib. Is the broken link a temporary server problem? And if I install the package again (when the link is fixed), does the package simply overwrites the previous files I’ve installed or is there a simpler way to just install the matplotlib compliant with the installed files from the superpack?

    Thanks, James

  248. Xin Says:

    “http://www.maths.otago.ac.nz/~fonnesbeck/matplotlib-1.0.svn_r8034-py2.6-macosx-10.6-universal.egg” break link. Must be “…r8035…”

  249. chris Says:

    Sorry folks, should be fixed now.

  250. Xin Says:

    Hi, I’m newbee in iPython and i have a problem with “-pylab” option. When start ipython with pylab, appear this error: IPython’s -pylab mode has been disabled until matplotlib supports this version of IPython.

    But if I launch this instructions I can use tk frontend. import matplotlib matplotlib.interactive(True) matplotlib.use(’tkagg’) # adjust for your backend %gui -a tk # adjust for your GUI from matplotlib import pyplot as plt plt.title(”Tk frontend”)

    I try to put this configuration into matplotlibrc (its equivalent), into ipythonrc, and into ipy_user_conf.py, but do not work. Exist some form to configure ipython with this instructions when I start ipython with “-pylab” option?

  251. Xin Says:

    Your IPython package do not contain demo module. :-(

  252. James T. Says:

    Thanks Chris. The installation went successfully. However, when I try to load matplotlib.pyplot, it couldn’t load and gave me this following message:

    “>>> import matplotlib.pyplot as plt Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/pyplot.py”, line 7, in from matplotlib.figure import Figure, figaspect File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/figure.py”, line 18, in from axes import Axes, SubplotBase, subplot_class_factory File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py”, line 12, in import matplotlib.axis as maxis File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py”, line 14, in import matplotlib.text as mtext File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/text.py”, line 30, in from matplotlib.backend_bases import RendererBase File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/backend_bases.py”, line 40, in import matplotlib.textpath as textpath File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/textpath.py”, line 9, in from matplotlib.mathtext import MathTextParser File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/mathtext.py”, line 52, in import matplotlib._png as _png ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/_png.so, 2): Library not loaded: /Users/fonnesbeck/Code/libs/lib/libpng12.0.dylib Referenced from: /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/_png.so Reason: image not found”

    Do you happen to have any clue what’s going on?

    Thanks, James

  253. A.M. Says:

    Hi Chris,

    First of, thanks for all your efforts in building a working scipy/numpy environment on the mac.

    I’ve just downloaded your latest superpack script and installed it (including the gfortran).

    I then invoked ‘ipython -pyalb’ and got the following problem:

    In [2]: from pylab import randn, hist

    Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/pylab.py”, line 1, in from matplotlib.pylab import * File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/pylab.py”, line 206, in from matplotlib import mpl # pulls in most modules File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/mpl.py”, line 2, in from matplotlib import axis File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py”, line 10, in import matplotlib.font_manager as font_manager File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/font_manager.py”, line 52, in from matplotlib import ft2font ImportError: /usr/local/lib/libfreetype.6.dylib: no appropriate 64-bit architecture (see “man python” for running in 32-bit mode)

    Is there a way to make this whole thing work in 64bit, or should I just use the 32bit version?

    Cheers, AM

  254. chris Says:

    Thanks for the bug reports, everyone. The Matplotlib dependency issue has been fixed. I just now tried ipython -pylab, and things seem to be working. Again, I am using the 64-bit python that ships with OSX 10.6.

  255. A.M. Says:

    Chris,

    I’ve done a clean re-install of the superpack, invoked ‘ipython -pylab’ and got the following warnings:

    /Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/core/ipapp.py:75: DeprecationWarning:

    IPython’s -pylab mode has been disabled until matplotlib supports this version of IPython. This version of IPython has greatly improved GUI integration that matplotlib will soon be able to take advantage of. This will eventually result in greater stability and a richer API for matplotlib under IPython. However during this transition, you will either need to use an older version of IPython, or do the following to use matplotlib interactively::

    import matplotlib
    matplotlib.interactive(True)
    matplotlib.use('wxagg')  # adjust for your backend
    %gui -a wx               # adjust for your GUI
    from matplotlib import pyplot as plt
    

    I then tried to follow the instructions and got the ‘libfreetype.6.dylib’ error.

    Rgds, AM

  256. vipul sharma Says:

    Awesome! worked like a charm

  257. chris Says:

    @AM: The matplotlib package is explicitly compiled without wx support, due to ongoing 64-bit issues. So, you should not even be able to get that far. Can you confirm that you are using my package? I’m pretty sure I got rid of the libfreetype dynamic library dependency.

  258. A.M. Says:

    Chris, I’ve gone over my machine and made sure that there is no trace of ipython (in particular, I’ve removed the files from /Library/Pythong/2.6/site-packages).

    I then reinstalled the 16.12 superpack, and this is the output:

    [~]>ipython -pylab /Library/Python/2.6/site-packages/ipython-0.11.bzr.r1205-py2.6.egg/IPython/core/ipapp.py:75: DeprecationWarning:

    IPython’s -pylab mode has been disabled until matplotlib supports this version of IPython. This version of IPython has greatly improved GUI integration that matplotlib will soon be able to take advantage of. This will eventually result in greater stability and a richer API for matplotlib under IPython. However during this transition, you will either need to use an older version of IPython, or do the following to use matplotlib interactively::

    import matplotlib
    matplotlib.interactive(True)
    matplotlib.use('wxagg')  # adjust for your backend
    %gui -a wx               # adjust for your GUI
    from matplotlib import pyplot as plt
    

    See the %gui magic for information on the new interface.

    warnings.warn(msg, category=DeprecationWarning, stacklevel=1) Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) Type “copyright”, “credits” or “license” for more information.

    IPython 0.11.bzr.r1205 — An enhanced Interactive Python. ? -> Introduction and overview of IPython’s features. %quickref -> Quick reference. help -> Python’s own help system. object? -> Details about ‘object’. ?object also works, ?? prints more.

    In [1]: import matplotlib

    In [2]: matplotlib.interactive(True)

    In [3]: from matplotlib import pyplot as plt

    Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/pyplot.py”, line 7, in from matplotlib.figure import Figure, figaspect File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/figure.py”, line 18, in from axes import Axes, SubplotBase, subplot_class_factory File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/axes.py”, line 12, in import matplotlib.axis as maxis File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/axis.py”, line 10, in import matplotlib.font_manager as font_manager File “/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r8035-py2.6-macosx-10.6-universal.egg/matplotlib/font_manager.py”, line 52, in from matplotlib import ft2font ImportError: /usr/local/lib/libfreetype.6.dylib: no appropriate 64-bit architecture (see “man python” for running in 32-bit mode)

    I must be doing something wrong here, but I honestly don’t know what.

    Regards, AM

  259. chris Says:

    @AM: Try the current install script — it has a build of matplotlib from revision 8037 (I notice you have 8035). See if the problem goes away. Just to be safe, go in and remove the current matplotlib package first.

  260. A.M. Says:

    Chris — it works!

    I still get the depreciation warning, but when I tried to follow the instructions and later the first demo from matplotlib.sourceforge.net, there had been no problems and the thing ran smoothly.

    Cheers and a merry Christmas, AM.

  261. Tony Says:

    Hi, I’m having a problem importing numpy after having run the install script. To preface my problem: I have XCode 3.2 and gcc build 5646 installed on a 1st gen Macbook (Intel Core Duo…note, not the Core 2 Duo) running Snow Leopard. Upon running the shell script (installing the recommended gfortran build, and confirming the existence of the modules in the site-packages directory), the “import numpy” command fails and returns the following output:

    Traceback (most recent call last): File “”, line 1, in File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/init.py”, line 130, in import add_newdocs File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py”, line 9, in from lib import add_newdoc File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/lib/init.py”, line 4, in from type_check import * File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py”, line 8, in import numpy.core.numeric as _nx File “/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/init.py”, line 5, in import multiarray ImportError: dlopen(/Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/multiarray.so, 2): no suitable image found. Did find: /Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/multiarray.so: mach-o, but wrong architecture

    Dunno if this helps, but “file …/multiarray.so” returns:

    /Library/Python/2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/multiarray.so: Mach-O 64-bit bundle x86_64

    …and, “gfortran -v” returns:

    Using built-in specs. Target: i686-apple-darwin10 Configured with: /Builds/apple/gcc-5646/build/obj/src/configure –disable-checking –prefix=/usr –mandir=/usr/share/man –enable-languages=c,objc,c++,obj-c++,fortran –program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ –with-slibdir=/usr/lib –build=i686-apple-darwin10 –with-gxx-include-dir=/usr/include/c++/4.2.1 –host=i686-apple-darwin10 –target=i686-apple-darwin10 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5646)

    Any help would be greatly appreciated as I’m at my wit’s end!

  262. Dustin Says:

    On OS X 10.6 with a Mac Book Pro Core Duo (NOT Core 2 Duo, the original 32 bit version!), I get the following error on “import numpy”:

    Traceback (most recent call last): File “”, line 1, in File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/init.py”, line 130, in import add_newdocs File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py”, line 9, in from lib import add_newdoc File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/lib/init.py”, line 4, in from type_check import * File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py”, line 8, in import numpy.core.numeric as _nx File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/init.py”, line 5, in import multiarray ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/multiarray.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy-1.4.0.dev7542_20091216-py2.6-macosx-10.6-universal.egg/numpy/core/multiarray.so: mach-o, but wrong architecture

    After a little googling I found out this is a Numpy bug that has been fixed in the latest SVN builds, but not the version used in the superpack. I tried to compile the latest SVN numpy myself, but I’m getting some mysterious build errors. Any chance the superpack will get updated to a more recent build of numpy? (I had no problems before I updated from 10.5 and reinstalled the superpack.) Thanks,

    Dustin

  263. chris Says:

    Unfortunately there is a nasty bug preventing me from building more recent revisions of numpy.

    http://projects.scipy.org/numpy/ticket/1343

    This has been extant for several weeks, but to date nobody on the numpy list has been able to resolve the issue. Until there is a fix, I can’t release newer builds. I can, however, look into applying the patch into my builds. Stay tuned.

  264. Dustin Says:

    I was finally able to get the SVN numpy version to compile (numpy.version = ‘1.5.0.dev7987′), and can confirm that it fixes the import problem for my 32 bit intel mac. All the other packages seem to work without recompiling, but I haven’t extensively tested them yet. If you update the numpy in superpack, I’d be happy to install it and check if the problem is fixed. I assume there are a few other people out there with 1st gen macbook pros having the same problem… Cheers,

    -Dustin

  265. Dustin Says:

    “I assume there are a few other people out there with 1st gen macbook pros having the same problem…”

    I just noticed a nearly identical problem from Tony posted an hour before my original one! If you would like to compile your own numpy, here’s how I did it:

    1) I used http://blog.hyperjeff.net/?p=160 as a starting point (step 4, the other stuff is covered by the superpack). 2) For whatever reason, I couldn’t get it to install via the normal commands:

    python setup.py build –fcompiler=gnu95 sudo python setup.py install

    Instead I logged in as root and ran setupegg.py, first building and then installing, e.g.:

    sudo su python setupegg.py

    I also ran the export statements on the referenced website after entering root, but I’m not sure if that was necessary. Hope this helps.

  266. Dustin Says:

    Ehh… sorry, the comment system screwed up my line spacing. There should be two separate commands to compile…

    sudo su

    python setupegg.py

  267. Tony Says:

    Hi Dustin, thanks for the pointer to that website. I grabbed the latest svn build for numpy, set the environment variables as specified on that link, and installed numpy. Lo and behold: it works! The other Superpack packages imports into my test Python instance just fine. So, it appears that the issue has been resolved for me.

  268. Chris S. Says:

    Happy New Years to everyone! Thanks for everything Chris! I found my problem…I installed a 32-bit version of Python 2.6.4. Is there a way to go back to the 64-bit version that comes with snow leopard? Or does anyone have a 64-bit installer of the 2.6.4 ? Thanks! C

  269. Olli Says:

    Hi,

    I tried installing the old version of the superpack on a virgin Leopard system and it just won’t go through with it successfully. It starts with errors when installing fortran, installing it manually did not solve my issues. Do you think you could update that old script so that it goes through? It is invaluable to our macs here as we work with leopard….

    A few example problems: Installing gFortran … hdiutil: mount failed - No such file or directory installer: Error the package path specified was invalid: ‘/Volumes/GNU Fortran 4.2.3/gfortran.pkg’. hdiutil: unmount: “/Volumes/GNU Fortran 4.2.3″ failed to unmount due to error 2. hdiutil: unmount failed - No such file or directory Downloading ez_setup … % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0Warning: Failed to create the file ez_setup.py 13 10285 13 1368 0 0 4751 0 0:00:02 –:–:– 0:00:02 11495 curl: (23) Failed writing body (0 != 1368) Installing ez_setup … python: can’t open file ‘ez_setup.py’: [Errno 2] No such file or directory

  270. cappy Says:

    I’m trying and failing to install this on my Snow Leopard system. (One of the warning messages I get is “Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.” I don’t know why it thinks the deployment target is pre-Tiger.)

    I posted the install log at http://members.cox.net/capologist/SuperpakInstallLog.txt . Can anybody help me diagnose and correct this problem?

  271. chris Says:

    @cappy: Can you try installing 64-bit gcc 4.2.1, and see if that is responsible?

  272. Jarrod Neven Says:

    Thank you, have had nothing put issues doing this manually. Running OSX 10.5.8 with python 2.6.4

  273. Claus Says:

    Hi, I installed the Scipy Superpack and I have toubles running matplotlib from within TextMate

    I’m using OSX 10.6.2 and TextMate 1.5.9

    When I run this simple script from Terminal, everything works fine, but from within TextMate with the python.bundle TextMate runs forever, no error message: import matplotlib.pyplot as plt plt.figure()

    I’ve asked the TextMate mailinglist

    here http://groups.google.com/group/textmate/browse_thread/thread/ca82156245169e2e/68ce34dcf7807592?lnk=gst&q=matplotlib#68ce34dcf7807592

    and here http://groups.google.com/group/textmate/browse_thread/thread/d828399be7059107/35de9d17f863a491?lnk=gst&q=matplotlib#35de9d17f863a491

    but they suggested I’d ask you guys. Has anybody experienced this before? What are you using for programming python on OSX?

    Thanks, Claus

  274. Brad Marston Says:

    The version of SciPy (0.7.1) that is installed by the Superpack contains a bug that prevents weave from working. Details are reported here: http://projects.scipy.org/scipy/ticket/855 I was able to fix the broken patch by following the prescription listed at the end (comment out one line in the file dumbdbm_patched.py and adding 4 lines of code.) Curiously an earlier version of the Superpack installed SciPy 0.8 which doesn’t have the bug.

  275. Daniel Egloff Says:

    Hi

    I want to come back to the question of Chris S. dated January 6th.

    I also installed Python 2.6.4 from python.org web site. This is a 32 bit version only. Does anybody have a 64 bit version?

    Chris asks: is there a way to go back to the 64-bit version that comes with snow leopard?

    This is simple: just add to your .bash_profile:

    PATH="/System/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
    export PATH
    

    This should bring you back to the system version 2.6.1.

    I can import numpy as installed by the super pack:

    hilbert:~ dani$ which python /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python hilbert:~ dani$ python Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.

    import numpy import scipy

    Setting python default versions can be done also with

    sudo defaults write com.apple.versioner.python Version 2.6

    But I have no idea how to choose between the /System/Library/… version and the /Library/… version

    Also note that python 2.6.4 is built with older compiler:

    hilbert:~ dani$ /Library/Frameworks/Python.framework/Versions/2.6/bin/python Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin

    Daniel

Leave a Reply