From 167f7e960cc4891ba2d6c49eaab927c110c295eb Mon Sep 17 00:00:00 2001 From: David Vierra Date: Tue, 3 Jan 2012 12:05:24 -1000 Subject: [PATCH] Pass numpy's include dir to pyximport.install() to fix "error: numpy/arrayobject.h: No such file or directory". --- nbt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nbt.py b/nbt.py index 683caf0..31332e6 100644 --- a/nbt.py +++ b/nbt.py @@ -5,7 +5,8 @@ try: from _nbt import * except ImportError: print "Import error loading precompiled _nbt extension. Trying pyximport..." - from pyximport import install; install() + import numpy + from pyximport import install; install(setup_args={'include_dirs':[numpy.get_include()]}) import _nbt from _nbt import * except ImportError, e: