3

I'm trying to learn python (in the process of installing numpy 1.8.0 in order to install BioPython), and am receiving the error "numpy requires System Python 2.7 to install" when I try to put numpy on my HD. I have recently updated my operating system from Mac OS X 10.6 to Mavericks, and am using python 2.7 (although other versions are installed on my computer). I am not an expert in terms of manually installing programs on mac, so there may be a simple solution to this, but I cannot understand why the OS is telling me that the version of python I'm using (for instance, if I type "python -V", the response is "Python 2.7.5") is not there.

Any insights are appreciated! Thanks, Ryan

mitochondrion
  • 61
  • 1
  • 3

1 Answers1

5

Odds are, you're trying to use a 32-bit NumPy from a 64 bit Python.

In order to check your Python architecture, you can open up your interactive session and type

>>> import sys
>>> is_64bits = sys.maxsize > 2**32
>>> is_64bits
# output will be True or False

Rather than offering anything new, I'll distill and link to a few other SO answers:

1) To fix this, you can install a 32-bit Python rather than using OSX's preinstalled Python, then set it as your default python in your PATH (this is a route recommended by the Python website anyway).

Reference to answer

2) You can install Python through the Enthought distribution

Reference to answer

Community
  • 1
  • 1
Chase Ries
  • 2,094
  • 2
  • 15
  • 16