5

I'm trying to install numpy under Python 3.3.0 running Mac OS 10.7.5 (Lion) and using the compilers that come with Xcode 4.5.1. I installed Python 3 and gfortran using homebrew without any hiccups, but pip3 install numpy fails. Looking at other suggestions online, I tried setting Clang as the C compiler using:

export CC=clang
export CXX=clang
export FFLAGS=-ff2c

but received the same error. The final line reports ValueError: underlying buffer has been detached, and I posted the full output.

So, instead I tried building directly from source using the instructions from SciPy.org. This appears to succeed; the build and install processes run to completion, although they are not shy about reporting warnings. The full log is again available as a Gist. I can then run numpy.test('full') from Python 3, and although there are some warnings about unclosed files that I don't understand, it reports that all tests pass.

Does anyone know why pip fails to build NumPy when I can apparently do it manually without a problem?

DGrady
  • 1,065
  • 1
  • 13
  • 23
  • 2
    I don't know about compiling especially on Mac, but doesn't pip3 get the 1.6 version while you basically compiled the 1.7 version? That could be a difference... – seberg Nov 01 '12 at 21:26
  • @seberg That's a great point, and when I try to compile the 1.6.2 version myself it does indeed fail. So that answers why `pip` was behaving differently; now I need to figure out why the build of SciPy is failing. Thanks! – DGrady Nov 01 '12 at 22:52
  • I get exactly the same error in Arch Linux. – astrojuanlu Nov 09 '12 at 08:08
  • 2
    This is https://github.com/pypa/virtualenv/issues/359 –  Nov 23 '12 at 14:24
  • Use homebrew! It will help you a lot on developing under Mac Os. http://brew.sh/ You will not face this kind problems. – TommasoF Jul 04 '14 at 13:15

1 Answers1

0

It looks like numpy now provides wheels on pypi, which should install correctly without needing to compile anything locally on your machine when using pip.

aebrahim
  • 36
  • 3