一、需要安装的环境
Anaconda
python
anaconda
tensorflow
keras
1:打开 Anaconda
2.在Anaconda Promt输入以下语句(一条条输入):
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda create -n tensorflow python=3.5
安装完成后输入 :
activate tensorflow
3:安装 tensorflow
安装CPU版本输入
pip install tensorflow
安装GPU版本输入
pip install tensorflow-gpu
可能会报错
解决方法:
创建配置文件:
(1)在系统目录C:\Users\用户\AppData\Roaming新建pip文件夹;
(2)在pip文件夹下新建pip.ini文件,并写入如下配置:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
再重新安装即可成功