1.tensorflow下载:首先打开cmd
(1)安装默认版本:输入pip install --upgrade tensorflow-gpu(GPU版本)或者 pip install --upgrade tensorflow(CPU版本),注意:如果电脑的显卡是NVIDIA牌子的可以装GPU版本,否则也可以使用CPU版本。
(2)安装指定版本:输入pip install tensorflow-gpu==版本号
(GPU版本)或者 pip install tensorflow==版本号
(CPU版本)
(3)tensorflow安装成功检查:打开cmd,输入ipython,进入python编辑页面,输入import tensorflow as tf,看结果是否报错,不报错可以。再输入 tf.test.is_gpu_available()可以判断GPU版本是否可用。
2.卸载已经安装的tensorflow: pip uninstall tensorflow,输入y,卸载即可。
各种版本tensorflow安装、卸载
最新推荐文章于 2023-03-18 10:34:37 发布