Introduce
这将近一个星期的tensorflow环境配置,发现了很多问题,对conda和pip有了更深入的认识,包括:
比较了
1、pip install tensorflow
2、conda install tensorflow
3、打开Anaconda Prompt,输入清华的仓库镜像,更新包更快:
conda config --add channelshttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
建立TensorFlow空间:conda create -n tensorflow python=3.5,设置Python版本为3.5
激活TensorFlow空间:activate tensorflow
安装TensorFlow:pip install--ignore-installed --upgrade tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl
conda config --add channelshttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
建立TensorFlow空间:conda create -n tensorflow python=3.5,设置Python版本为3.5
激活TensorFlow空间:activate tensorflow
安装TensorFlow:pip install--ignore-installed --upgrade tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl
这三种方式,发现如果不适用GPU加速,第二个最可靠的完成tensorflow的安装,此时是CPU版本。在spyder运行程序没有问题,而第三种方法虽然也能安装,而且在cmd-python 环境中也能运行测试程序,但是在spyder中却不行。