dmlc / xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow
https://xgboost.readthedocs.io/en/stable/
Apache License 2.0
26.23k stars 8.72k forks source link

Can not import xgboost in Anaconda Jupyter Notebook, with error 127 #1644

Closed wangjiahong closed 6 years ago

wangjiahong commented 8 years ago

Xgboost could work in python, but does not work in Anaconda Jupyter notebook

3

1 2

Environment info

Operating System: Windows 7 64bit

Compiler:

Package used (python/R/jvm/C++): Python 2.7

xgboost version used: 0.6

If you are using python package, please provide

  1. The python version and distribution: Python 2.7.12 |Anaconda 4.1.1 (64-bit)
wangjiahong commented 8 years ago

@phunterlau @pluskid @xydrolase Could you help me with this, please?

phunterlau commented 8 years ago

@wangjiahong666 have you verified with this instruction https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en and the PATH of your xgboost installation? The PATH can be the tricky key for notebooks.

wangjiahong commented 8 years ago

@phunterlau Thank you Yes, I verified under the above instruction when I installed Xgboost.

Now I have figured out how to get Xgboost work in Jupyter Notebook. I have to launch Jupyter Notebook by clicking the "Jupyter Notebook" from start menu, then Xgboost works.

1

If I launch jupyter notebook from Git Bash, then Xgboost does NOT work. Very interesting......

phunterlau commented 8 years ago

@wangjiahong666 you might want to manually set the PATH from python's sys so the notebook doesn't rely on specific windows PATH configuration.

rosnilt commented 7 years ago

Yeyy..finally opening Jupyter notebook from the start menu works for me as well, thanks a lot.