我的系统规格-Windows7,python 2.7 Anaconda。我正在尝试从github导入xgboost模块。
import xgboost as xgbImportError:没有名为xgboost的模块
请指导如何从github链接到我的python库,或者一般情况下如何将任何模块从github导入到Python/R的本地库。
发布于 2017-11-07 17:08:23
让你的生活更轻松。这是设置python lib的一般方法。如果没有,请先在cmd中尝试"pip install xgboost“和"easy_install xgboost”:
1:下载git和MINGW 2:下载完成后,需要设置保存xgboost代码的路径
$ cd /e/algorithm3:使用下面的代码下载xgboost。
$ git clone --recursive https://github.com/dmlc/xgboost
$ cd xgboost
$ git submodule init
$ git submodule update4:打开mingw并编译此项目。并添加到环境的路径。5:打开bash和
$ which mingw32-make
to see if you can get path back6:编译xgboost进入xgboost $ cd /e/algorithm/xgboost7:在cmd后面输入进行编译,也可以编写一个bat或shell来保存它。
$ cd dmlc-core
$ make -j4
$ cd ../rabit
$ make lib/librabit_empty.a -j4
$ cd ..
$ cp make/mingw64.mk config.mk
$ make -j48:成功
https://stackoverflow.com/questions/33889689
复制相似问题