Tensorflow2.0安装教程 (CPU版本,windows环境)
2023-09-27 14:19:44 时间
Anaconda创建虚拟环境报错:An HTTP error occurred when trying to retrieve this URL,报错截图如下。
错误原因:默认镜像源访问速度过慢,会导致超时从而导致更新和下载失败。
解决方案:更换镜像源为清华镜像源,并且删除默认镜像源。
初始.condarc文件里内容
查看配置文件
conda config --show
命令行中依次使用以下命令:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes
在用户根目录(C:\Users\用户名)下找到.condarc文件,打开并并编辑,删除其中的 defaults 配置行。若是依旧报错。修改 C 盘 user 文件夹下的 .condarc 文件中的 https 修改为 http。
接下来创建一个新的环境来安装 tensorflow 以及相关的依赖库,便于管理。
conda create -n tensorflow2 python=3.6
激活进入这个环境
conda activate tensorflow2
pip install tensorflow==2.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
输出 tensorflow 版本为2.0.0,当前电脑并不支持 GPU 版本,我们配置的为 CPU 版本。
相关文章
- Redis下载及安装(windows版)
- docker for windows--Windows 10 家庭中文版 21H2 安装Docker Desktop初体验
- Windows上Scala安装教程
- Windows 10 64位 SQLite 安装教程
- metasploit工具的Windows版安装及使用教程
- Windows Docker 安装教程
- Windows系统Java配置 JDK下载、安装、环境变量配置 开发环境搭建一次解决
- Jenkins(持续集成)Windows版本安装
- Jmeter下载安装配置及使用(windows)
- Windows上安装配置SSH教程(2)——在Windows XP和Windows 10上安装并配置OpenSSH for Windows
- Windows上安装配置SSH教程(4)——WinSCP+OpenSSH 使用公钥自动登陆
- Windows安装redis
- Windows Server 安装后无法使用无线与音频
- 【Docker学习笔记2Day】-Windows桌面版安装
- Windows下Redis安装与配置的两种方式
- TortoiseGit和msysGit安装及使用笔记(windows下使用上传数据到GitHub)[转]
- VSCode 安装教程与常用插件安装(Windows)
- Windows安装PyCharm2021教程[转载]
- windows下sklearn库的安装教程,还有Numpy、Scipy、matplotlib库
- windows下sklearn库的安装教程,Numpy、Scipy、matplotlib
- Windows安装mysql8.0
- windows下宝塔安装教程
- windows服务无法卸载;windows服务安装和卸载
- windows全局安装tree命令程序图文教程
- Leanote 二进制版详细安装教程 Windows
- windows下面安装Python和pip终极教程