Win 10+Anaconda 环境下 tensorflow+keras 安装指南


1 安装环境 Win 10、Anaconda 3.6

2 安装步骤:

(1)在 anaconda 终端 Anaconda Prompt 中输入:conda create -n tensorflow python=3.5

【设置清华镜像】在终端中输入:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

(2)安装完成后,输入:activate tensorflow 激活环境

(3)安装 CPU 版本的 tensorflow 输入:pip install tensorflow

【使用 pip 清华镜像方式安装 python 包】安装:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  requests

升级:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade  requests

安装 tensorflow:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl

清华 tensorflow 镜像网链接:https://mirrors.tuna.tsinghua.edu.cn/tensorflow/ 

(4)在终端中测试:进入 python3.5,输入:import tensorflow as tf 无报错,即成功

在终端中exit()退出python,输入 deactivate tensorflow 可以退回到 python3.6 版本

(5)在 spyder 中使用 tensorflow:进入 anaconda navigator,点击左侧的 home,选择 application on tensorflow,然后安装界面中的 spyder


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM