conda安装指定版本TensorFlow
文章目录
- 一、系统环境
- 二、安装步骤
一、系统环境
操作系统:Windows7 64位,
Python环境:Python3.7;conda 4.10.3
目标版本:TensorFlow1.14.0
二、安装步骤
预处理:在开始安装之前,建议检查一下环境变量是否配置正常,在Path中查看
D:\anaconda\condabin
D:\anaconda\Scripts
D:\anaconda\Library\bin
D:\anaconda\
如果后面出现“WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available”异常,大概率是环境变量问题。
1.如果先前配置过清华等镜像地址,建议首先执行
conda config --remove-key channels
将Anaconda的源恢复为默认
出现报错
CondaKeyError: 'channels': key 'channels' is not in the config file
即为恢复成功。
关于源的配置在“C:\Users\Administrator.condarc”文件中,恢复成功后可以看到:
show_channel_urls: true
2.然后需要配置源
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/win-64
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/win-64
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
conda config --set show_channel_urls yes
注意,这里要配置位http,配置https会出现关于ssl异常的报错
此外,在镜像地址后都添加了/win-64,这是根据清华镜像文件存放位置决定的,清华镜像地址为:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
如果pip某些包发生“当前平台不存在该文件”异常,可以通过镜像目录查找文件地址
配置完成后,同样可以进入“C:\Users\Administrator.condarc”文件中进行确认
show_channel_urls: true
channels:- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/win-64- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/win-64
如果存在“- default”,请进行删除
3.上面两步都是针对镜像源的配置,接下来才是TensorFlow的流程。首先要配置虚拟环境。
conda create -n ###(为虚拟环境起一个名字) python=3.7(python版本)
如果出现了“CondaHTTPError: HTTP 000 CONNECTION FAILED for url”异常,就是上两步配置错了,就不要继续下面的步骤了。(这里主要考虑镜像地址问题,还有http问题)
4.安装完成后,需要激活虚拟环境,我这里是
activate tensorflow
有些人是“conda activate tensorflow”,但我这里会报错,找不到该命令。
然后对TensorFlow进行安装,我这里网络安装没有成功,所以直接下载了TensorFlow1.14.0文件
从镜像源处下载tensorflow并安装,镜像源地址:
https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/tensorflow/
找到对应自己python版本的文件
注意,这里首先是找TensorFlow版本,即1.14.0,然后是python版本号,对应cp37,如果是python3.5就是cp35;最后是平台,即win_amd64
下载完成后,在激活的虚拟环境中执行
pip install D:\tensorflow-1.14.0-cp37-cp37m-win_amd64.whl
安装成功!!!
conda安装指定版本TensorFlow相关推荐
- conda 安装指定版本tensorflow cpu/gpu
CPU conda search tensorflow conda install tensorflow=1.12.0 GPU conda search tensorflow-gpu conda in ...
- macOS conda 安装指定版本的 Pytorch
因为在 macOS 下用不了 CUDA, 所以安装 Pytorch 时只能安装 CPU 版本的. 此外, 按照 Pytorch 官网给出的安装方式, 网络太慢了, 并且总是中断, 所以考虑 清华的镜像 ...
- 清华源安装指定版本tensorflow
以安装1.14.0版本为例, 记录以下 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.14.0
- 安装指定版本的GPU版本的tensorflow小技巧
安装指定版本的GPU版本的tensorflow小技巧 使用类似 pip install tensorflow-gpu==1.4 命令即可
- 解决Pthon中无法安装旧版本TensorFlow问题
解决Python中无法安装旧版本TensorFlow问题 前言 一.报错信息 二.报错原因 三.解决方案 conda命令学习 最终解决 如何使用新创建的环境 pycharm Jupyter 前言 当我 ...
- 使用conda安装旧版本torch0.2.0
想安装指定版本的pytorch,指令(在cuda9下也可以安装): conda install pytorch=0.1.10 -c soumith 然后,出现错误 安装出现HTTP 000 CONNE ...
- linux创建新的虚拟环境,并安装指定版本的包
linux创建新的虚拟环境,并安装指定版本的包 1. 查看已有的虚拟环境 2. 创建新虚拟环境 3. 查看是否已经创建好了虚拟环境. 4. 启动环境 5. 直接安装需要的包的版本 5.1 服务器无法连 ...
- 安装指定版本Angular-CLI
卸载并安装指定版本Angular CLI 卸载之前的版本 npm uninstall -g @angular/cli 清除缓存,确保卸载干净 npm cache clean 检查是否卸载干净 输入ng ...
- CentOS 6.9/7通过yum安装指定版本的JDK/Maven
说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql xxx可以知道全部文件的地方等等. 一.安装JDK(Oracle JDK 1.8) # wget -- ...
最新文章
- Ubuntu中Atom编辑器显示中文乱码的处理方法
- was not found on the Java Build Path
- Android插件化原理解析——概要
- break和continue特殊玩法“标签”
- 我的MySQL数据库学习笔记
- 错误契约(FaultContract)与异常处理(转)
- 再见了SpringMVC!这个框架有点厉害,甚至干掉了Servlet!
- 3D贴图绘制软件Substance 3D Painter 2022中文版
- linux 所有软件免费,Linux 系统下常用软件一览表
- 如何用php建立图库,教你搭建自己的图片库
- Android的增量更新
- arch使用create_ap创建wifi热点
- 写得非常好的关于CV行业的分析
- Ubuntu20.04环境下编译MNN
- php调用chromium截图,chromium截图实现
- Linux yest2图形安装ftp,(伪)从零开始学转录组:软件安装
- 三维FEM的刚度矩阵数量级
- 《电商网络营销理论与实战》
- 程序员晒端午福利,网友:看了你的福利我想摔手机
- thinkpad x230评测_蘑菇爱搞机 篇五十九:手持联想Thinkpad X230的我,为什么没有升级笔记本——小米Air全金属超轻薄笔记本 体验评测...