Anaconda3安装xgboost出现连接错误CondaHTTPError

在Mac上安装完Anaconda3后正准备通过conda install xgboost来安装xgboost,结果出现下面的错误:

通过查询资料意识到Anaconda3原生的python版本为3.6,添加3.5版本的python后可以解决这个问题。

conda create -n py35 python=3.5

激活3.5使用以下命令:

source activate py35

撤销激活使用以下命令:

source deactivate

现在通过激活命令激活python3.5后,再试着来安装xgboost:

(py35) [[email protected]:~]$conda install xgboost

......

(py35) [[email protected]:~]$python
Python 3.5.4 |Continuum Analytics, Inc.| (default, Aug 14 2017, 12:43:10)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xgboost

>>>

成功了!