Pass numpy's include dir to pyximport.install() to fix "error: numpy/arrayobject.h: No such file or directory".

This commit is contained in:
David Vierra 2012-01-03 12:05:24 -10:00
parent 5687de8f36
commit 167f7e960c

3
nbt.py
View File

@ -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: