1. 系統
· 放棄Windows
所以使用Linux, 這裏使用Cent OS。
2.安裝
選擇Anaconda—— 全面
使用虛擬環境也可以。
2.1 安裝 Anaconda
下載並運行安裝包,依照提示操作即可
# 如果想用Anaconda,不想用就不必安裝
wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh | sh
虛擬環境的安裝就不多說。
2.2安裝 TensorFlow
CPU版本: conda install tensorflow
GPU版本: conda instal tensorflow-gpu
# pip 安裝
pip install tensorflow
2.3安裝 Keras
conda install keras
# Pip 安裝
pip install keras
3.安裝結果驗證
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:07:29)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>> import tensorflow
完成。