今天在firefly上安裝tensorflow1.12.0時老是報
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Geo382/h5py/setup.py';
f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__,
'exec'))" install --record /tmp/pip-record-MrxlHq/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-install-Geo382/h5py/
這個錯誤。返回去看一下,這正是在裝h5py時報的錯。
解決辦法 :
sudo pip install cython
sudo apt-get install libhdf5-dev
sudo pip install h5py
直接裝h5py會報如上錯誤,安裝完 libhdf5-dev錯誤就消失了。