重装系后.....................................................................................................................................................................
卸载python:python3.6在安装后,在安装目录下并没有对应的unstall程序,为了删除python3.6,可以重新执行安装文件,这时候安装程序中会多出一个unstall的选项,选择unstall即可顺利卸载python。
也可在程序与功能里卸载。
Python下载中的windows版本的区别:
卸载Anaconda:在C:\Users\“用户名”\ 路径下的Anaconda3文件夹中卸载。
安装Anaconda,安装cuda,下载cudnn,cudnn解压后,将其路径添加到环境变量-系统变量的path中。例如:
进入Anaconda prompt 先设置国内镜像 :
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
然后:
conda install anaconda
创建虚拟环境:
conda create -n tf1_3 python=3.6
#conda create -n tensorflow
进入虚拟环境 :
activate tf1_3
pip install --upgrade --ignore-installed tensorflow-gpu(==1.3.0)(不加版本号默认安装最新版本)
(CPU版本:pip install --upgrade --ignore-installed tensorflow)
pip install tensorflow(不指定版本默认安装最新版本)
(pip install --upgrade --ignore-installed http://mirrors/tuna.tsinghua.edu.cn/tensorflow/windows/gpu/tensorflow_gpu-1.3.0rc0-cp35-cp35m-win_amd64.whl)
deactivate
然后再创建一个虚拟环境:
activate tf1_0
再做个pip install --upgrade --ignore-installed https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/gpu/tensorflow_gpu-1.3.0-cp35-cp35m-win_amd64.whl
deactivate
出现错误:
解决:
输入命令:conda install -c anaconda html5lib
之后再安装。
不行在尝试:conda install pip
之后在安装。
查看tensorflow版本:
>python
>>>import tensorflow as tf
>>>tf.__version__
'1.8.0'
查看tensorflow安装路径:
>>>tf.__path__
['C:\\Users\\RainysunnyDay\\Anaconda3\\lib\\site-packages\\tensorflow']
在 Windows 上安装 TensorFlow:https://tensorflow.google.cn/install/install_windows?hl=zh-CN