debian 9 安装 opencv and keras

安装opencv
apt-get install build-essential

apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff5-dev  libdc1394-22-dev

apt-get install  python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip

测试:
打开Python
import cv2

成功就说明opencv安装成功

安装keras
pip install h5py
apt install -y python-dev python-pip python-nose gcc g++ git gfortran vim
apt install -y libopenblas-dev liblapack-dev libatlas-base-dev
pip install -U --pre pip setuptools wheel
pip install -U --pre numpy 
pip install -U --pre scipy 
pip install -U --pre matplotlib
pip install -U --pre scikit-learn
pip install -U --pre scikit-image
pip install h5py
pip install -U --pre tensorflow
pip install -U --pre keras

还得安装桌面。
apt-get install -y xorg 
apt-get install -y lxde-core
apt-get install -y tightvncserver

你可能感兴趣的:(opencv,keras)