我使用这里的说明成功地在我的Raspberry Pi上安装了Keras:https://medium.com/@abhizcc/installing-latest-tensor-flow-and-keras-on-raspberry-pi-aac7dbf95f2
sudo apt-get install python3-numpy
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install python3-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install gfortran
sudo apt-get install python3-setuptools
sudo apt-get install python3-scipy
sudo apt-get update
sudo apt-get install python3-h5py
sudo pip3 install keras
但是,当我尝试将keras导入jupyter笔记本(Python 3)或python shell时,它说
ModuleNotFoundError: No module named 'keras'
任何帮助将不胜感激。
您可以查看您正在使用的解释器:which python
并检查keras与pip show keras
一起安装的位置。
问题是你在jupyter中使用的python和shell不是你安装keras的那个。