Anaconda卡在loading application

安装Anaconda3-6.3.0-Windows-x86_64,启动anaconda一直卡在loading applications,试过卸载重装几遍不能解决问题,

解决方案:

首先要确定,anaconda3的路径对

Anaconda卡在loading application_第1张图片

如果出现安装 tensorflow报错的情况

Anaconda卡在loading application_第2张图片

 还需要参考A reportable application error has occurred. Conda has prepared the above report......_不良使的博客-CSDN博客

中修改condarc的方法才能进行下载

anaconda3\Lib\site-packages\anaconda_navigator\api\conda_api.py 行1364 把 data = yaml.load(f) 改为 data = yaml.safeload(f)

紧接着是tensorflow的安装

  1. 创建tensorflow环境

【注】在anaconda安装好之后,默认的镜像是官方的,由于官网的镜像在境外,使用国内的镜像能够加快访问的速度,当然不配置也行,就是速度慢。

Anaconda Prompt中运行:

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

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

conda config --set show_channel_urls yes

速度加快不容易出错,如果你下载的就是清华镜像这步忽略

①安装python3.6anaconda prompt输入: conda create --name tensorflow python=3.6

Anaconda卡在loading application_第3张图片

回答:y

等待安装会需要一定时间

安装成功后anacondaenvironment里会有你创建的tensorflow环境

还有一种方法是直接在anaconda界面点create,输入tensorflow(即环境名称)点create确定即可Anaconda卡在loading application_第4张图片

②激活tensorflowtensorflow环境,anaconda prompt输入: activate tensorflow 发现括号中由base变为tensorflow

③检测tensorflow的环境添加到了Anaconda里面:conda info --envs(注意*号)

Anaconda卡在loading application_第5张图片

④检测当前环境中的python的版本:python --version

  1. 安装tensorflow

经过上一步的activate tensorflow ,当前已经在创建的tensorflow环境下了

①根据之前查找的tensorflow的版本安装1.15版本tensorflowtensorflow版本过高容易报错)pip install --upgrade --ignore-installed tensorflow==1.15 需要一段时间

【注】这边一般不建议这么下载会报错,输入下方命令从豆瓣下载,速度快不易报错

pip install tensorflow==1.15.0 -i https://pypi.douban.com/simple/

查看是否安装成功:conda list

出现该模块则成功

③验证功能正常:输入python 进入代码环境

④检测

输入代码测试

import tensorflow as tf

hello = tf.constant('hello,tf')

sess = tf.Session()

print(sess.run(hello))

输出:b'hello,tf' 则成功

方法二

模块网址

https://www.lfd.uci.edu/~gohlke/pythonlibs/

下载安装

 pip install “tensorflow‑1.9.0‑cp36‑cp36m‑win_amd64.whl”

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

tensorboard 1.15.0 requires setuptools>=41.0.0, but you'll have setuptools 36.4.0 which is incompatible.

你可能感兴趣的:(python,ubuntu,深度学习)