0.查看版本
python --version
pip3 --version
virtualenv --version
1.安装virtualenv
pip3 install -U pip virtualenv
2.创建虚拟环境
C:> E:
E:> virtualenv --system-site-packages -p python3 ./venv
3.激活虚拟环境
E:> .\venv\Scripts\activate
(venv) E:> pip install --upgrade pip
(venv) E:> pip list # show packages installed within the virtual environment
(venv) E:> deactivate # exit virtualenv later
4.安装tensorflow pip package
(venv) E:> pip install --upgrade tensorflow
5.验证安装
(venv) E:> python -c “import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))”