lhelontra / tensorflow-on-arm

TensorFlow for Arm
MIT License
1.05k stars 274 forks source link

Can't use this library with older versions of numpy <1.16 #47

Closed snowzach closed 5 years ago

snowzach commented 5 years ago

There is an issue with numpy 1.16 apparently: https://github.com/numpy/numpy/issues/12837 It looks like it has been resolved in 1.16.1

I am using the aarch64 library with home assistant which somehow forces numpy 1.15.4 and when I attempt to load this library I get ImportError: No module named 'numpy.core._multiarray_umath'

It appears to me that maybe recompiling this with numpy 1.16.1 might fix it? I'm not a python expert so not totally sure.

lhelontra commented 5 years ago

HI, just upgrade numpy package.

pip install -U numpy
snowzach commented 5 years ago

Yah, I did that and it works, but then home-assistant force downgrades it as near as I can tell.

snowzach commented 5 years ago

If anyone else ends up having this issue, I fixed it by editing the home assistant source: homeassistant/components/image_processing/tensorflow.py and setting the line: REQUIREMENTS = ['numpy==1.15.4', 'pillow==5.4.1', 'protobuf==3.6.1'] to instead require numpy==1.16.0 This will keep homeassistant from downgrading numpy.