Pass numpy's include dir to pyximport.install() to fix "error: numpy/arrayobject.h: No such file or directory".
This commit is contained in:
parent
5687de8f36
commit
167f7e960c
3
nbt.py
3
nbt.py
@ -5,7 +5,8 @@ try:
|
|||||||
from _nbt import *
|
from _nbt import *
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Import error loading precompiled _nbt extension. Trying pyximport..."
|
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
|
import _nbt
|
||||||
from _nbt import *
|
from _nbt import *
|
||||||
except ImportError, e:
|
except ImportError, e:
|
||||||
|
Reference in New Issue
Block a user