首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从Github导入Xgboost包到windows7上的python2.7?

如何从Github导入Xgboost包到windows7上的python2.7?
EN

Stack Overflow用户
提问于 2015-11-24 17:19:45
回答 1查看 623关注 0票数 3

我的系统规格-Windows7,python 2.7 Anaconda。我正在尝试从github导入xgboost模块。

代码语言:javascript
复制
import xgboost as xgb

ImportError:没有名为xgboost的模块

请指导如何从github链接到我的python库,或者一般情况下如何将任何模块从github导入到Python/R的本地库。

EN

回答 1

Stack Overflow用户

发布于 2017-11-07 17:08:23

让你的生活更轻松。这是设置python lib的一般方法。如果没有,请先在cmd中尝试"pip install xgboost“和"easy_install xgboost”:

1:下载git和MINGW 2:下载完成后,需要设置保存xgboost代码的路径

代码语言:javascript
复制
$ cd /e/algorithm

3:使用下面的代码下载xgboost。

代码语言:javascript
复制
$ git clone --recursive https://github.com/dmlc/xgboost
$ cd xgboost
$ git submodule init
$ git submodule update

4:打开mingw并编译此项目。并添加到环境的路径。5:打开bash和

代码语言:javascript
复制
$ which mingw32-make
to see if you can get path back

6:编译xgboost进入xgboost $ cd /e/algorithm/xgboost7:在cmd后面输入进行编译,也可以编写一个bat或shell来保存它。

代码语言:javascript
复制
$ cd dmlc-core
$ make -j4
$ cd ../rabit
$ make lib/librabit_empty.a -j4
$ cd ..
$ cp make/mingw64.mk config.mk
$ make -j4

8:成功

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33889689

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档