Anaconda中创建tensorflow环境

Anaconda中创建tensorflow环境

需要安装Anaconda
主要是创建新环境和安装tensorflow

方法一

命令行创建环境

win + r输入cmd进入命令行
在命令行中输入conda create -n tf python=3.7 一定要输python的版本号,不然会出错。
如图

在这里插入图片描述
创建完成如图

在这里插入图片描述
在这里插入图片描述
接下来激活tf环境
输入activate tf
在这里插入图片描述
用pip工具安装tensorflow
输入pip install tensorflow
安装完成

方法二

在Anaconda上直接安装


直接点create,选python版本就安装好了

注意事项

镜像源下载
先后输入命令

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

在C盘 用户名 username有一个.condarc的文件

在这里插入图片描述

用记事本打开
修改成成如下

channels:

  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
    ssl_verify: true
    show_channel_urls: true

如图

在这里插入图片描述

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值