0

I maintain Python packages on my system (OS 10.9) with pip, and when I try to load matplotlib I get a version error, suggesting that my installation process has built matplotlib using a newer version of numpy than is on my system. I'm not sure how this is possible (there's only one version of numpy on my system, and that's the one that was present when matplotlib was installed, all my versions are current according to yolk and pip, and I have all the latest Xcode ommand line tools from Apple, and only one, correct Python — Apple 2.7.5 — in my path), but for good measure, I've uninstalled and reinstalled both numpy and matplotlib, in that order, to no avail. I've seen many other questions here about similar Scipy stack versioning issues and wonder:

Is there a particular order in which elements of the Scipy stack should be built/installed to ensure that correct versions are available to satisfy dependencies? Perhaps there are pip options I can use to ensure that such version errors don't happen?

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418

2 Answers2

1

The order is: Numpy first, but otherwise it doesn't matter. Only Numpy has a C API.

pv.
  • 33,875
  • 8
  • 55
  • 49
  • Any idea why doing that wasn't sufficient to avoid my error message? I and to `sudo pip install -U --force-reinstall scipy`, which seems to have solved the problem completely. – orome Oct 29 '13 at 19:37
  • 1
    It is sufficient: there are *no* other version dependencies in the Scipy stack. The most likely explanation for what you saw is that for a reason or another, pip did not do what you think it should have done. – pv. Oct 29 '13 at 20:35
  • Any idea who the `--force-reinstall` fixes the problem. Is that consistent with there having been some other version of numpy somewhere that I didn't see, which is now removed? – orome Oct 29 '13 at 21:22
-1

My understanding is that mac has no built-in package manager which is why scipy recommends installing MacPorts: scipy.org/install.html

Joshua Cook
  • 12,495
  • 2
  • 35
  • 31