1.安装Tensorflow
1.1 先装python
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh
1.2设置环境变量
vim ~/.bashrc #添加 export PATH=/home/kn/anaconda3/bin:$PATH source ~/.bashrc
1.3添加pip清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
1.4安装
pip install tensorflow
1.5报错
apt install gcc g++
1.6报错
pip install wrapt --ignore-installed
2.安装opencv
2.1 官网 https://opencv.org/ 下载最新版
https://github.com/opencv/opencv/archive/4.5.0.zip
2.2安装依赖
apt install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
2.3
unzip opencv-4.5.0.zip cd opencv-4.5.0 mkdir release cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make install
2.安装pygame
apt install python-pygame
3.下载flappy bird
git clone https://github.com/yenchenlin/DeepLearningFlappyBird
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com