TensorFlow 2.1 + Python 3.7
Preparations
-
Anaconda 安装
- conda install cudatoolkit=10.1
- conda install cudnn=7.6
- pip install tensorflow==2.1
-
Pycharm, VSCode 等IDE安装
-
安装代码如下
conda create -n TF2.1 python=3.7 conda activate TF2.1 conda install cudatookit=10.1 conda install cudnn=7.6 pip install tensorflow==2.1
验证是否成功
import tensorflow as tf tf.__version__ # 2.1.x