记录安装anaconda3-5.01,清华镜像与wordcloud的各种报错

这里主要解析安装anaconda3-5.01,清华镜像,wordcloud时的报错记录

本作者电脑情况:操作系统Ubuntu14.04

开始的时候尝试用pyenv下载anaconda

pxh@pxh:~$ pyenv install anaconda3-5.0.1
Downloading Anaconda3-5.0.1-Linux-x86_64.sh...
-> https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
error: failed to download Anaconda3-5.0.1-Linux-x86_64.sh

BUILD FAILED (Ubuntu 14.04 using python-build 20160602)

Inspect or clean up the working tree at /tmp/python-build.20180430153443.3493
Results logged to /tmp/python-build.20180430153443.3493.log

Last 10 log lines:
/tmp/python-build.20180430153443.3493 ~
curl: (18) transfer closed with 545325503 bytes remaining to read

上网翻了个遍,没有办法解决,后来就改用如下方法安装anaconda

输入命令

wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh   
bash Anaconda3-5.1.0-Linux-x86_64.sh   

这里要注意不要以管理员的身份去下载,后果很严重

执行完上面两条命令后会进入安装界面

注意下面2处不要回车用缺省的选项:

Do you accept the license terms? [yes|no]

[no] >>> yes

Do you wish the installer to prepend the Anaconda3 install location

to PATH in your /home/ai/.bashrc ? [yes|no]

[no] >>> yes

Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]

>>> no

最后验证anaconda安装是否成功

$ cd

$ . ./.bash_profile

$ python

[ai@AIDevEnv ~]$ python

Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)

[GCC 7.2.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

用exit()命令退出python

>>> exit()


上面是安装anaconda,以下是安装清华镜像

插一句:或许会有人问为什么要安装清华镜像,原因很简单,你直接用conda来下载wordcloud包是用外网来下载的,很慢,网有时会断,清华镜像可以帮助减少下载时间   ---这只是个人想法,不知道对不对,反正这个坑我掉过

pxh@pxh:~$ conda install wordcloud

运行报错

Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/main/linux-64/repodata.json.bz2>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Read timed out.",),)

解决方法

pxh@pxh:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
pxh@pxh:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
pxh@pxh:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
pxh@pxh:~$ conda config --set show_channel_urls yes

安装wordcloud

conda install wordcloud
最后成功



  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值