!!建议!! 没事不要用虚拟环境,我本来想搞虚拟环境专门学习tensorflow,中途遇到莫名其妙导包问题,无奈使用原始环境,因此tensorflow环境,你只需要直接安装。
安装指定版本:
pip install tensorflow-gpu==1.4.0
卸载指定版本:
pip uninstall tensorflow-gpu==1.4.0
安装最新GPU版本:
pip install --upgrade tensorflow-gpu
安装最新CPU版本:
pip install --upgrade tensorflow
我们安装CPU和GPU版本,不学老版本了。安装好后查看安装的版本:
import tensorflow as tf
print(tf.__version__)