Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with implementing xgboost in Python #894

Closed
njbadger opened this issue Feb 28, 2016 · 8 comments
Closed

Issues with implementing xgboost in Python #894

njbadger opened this issue Feb 28, 2016 · 8 comments

Comments

@njbadger
Copy link

Hi,

I am trying to learn Python. I am having issues with being able to properly implement/install/use xgboost. I am using

https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13043/run-xgboost-from-windows-and-python

as my guide and nothing seems to be working.

I tried PIP INSTALL and got the following message:

You are using pip version 7.0.3+xy 11, however version 8.0.3 is available. You should consider upgrading via the 'python -m pip install--upgrade pip command.

collecting xgboost. Using cached xgboost--0.4a30.tar.gz

No files/directories in C:\users\appdata\local\temp\pip-build-5urgx3\xgboost\pip-egg-info (from PKG-INFO)

but when i try a simple python program I get the following message:

File "", line 1, in
runfile('C:/Users/#####/#####/python/trial2.py', wdir='C:/Users/######/#####/python')

File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile
execfile(filename, namespace)

File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/xxxxx/xxxxx/python/trial2.py", line 10, in
import xgboost as xgb

ImportError: No module named xgboost

I also tried following the step by step instructions given at the address I provided above. In all cases, I followed the instructions literally and the commands seemed to be accepted. I got the C:\ prompt and no error messages, but when I tried running Python code, I got an error message similar to the one above.

Please feel to treat me as a complete novice. I will appreciate any advice.

njbadger

@phunterlau
Copy link
Contributor

please use the visual studio solution file at windows for building from github: pip installation currently doesn't support windows for now.

@njbadger
Copy link
Author

Thank you.

I will try the visual studio solution.

On Sun, Feb 28, 2016 at 11:39 PM, Hongliang Liu notifications@github.com
wrote:

please use the visual studio solution file at windows for building from
github: pip installation currently doesn't support windows for now.


Reply to this email directly or view it on GitHub
#894 (comment).

@njbadger
Copy link
Author

njbadger commented Mar 1, 2016

Once again, I am following the instruction here...
https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13043/run-xgboost-from-windows-and-python
.

I am asked to do the following...2) Copy all content from
https://github.com/dmlc/xgboost/tree/master/windows and Open Visual studio
existing project on Visual studio
When I click on the address, I get a "Page not found message". Is there
perhaps a newer/more detailed version of the instructions to follow?

Thanks,

Gary

On Mon, Feb 29, 2016 at 4:11 PM, gary galow gggalow01@gmail.com wrote:

Thank you.

I will try the visual studio solution.

On Sun, Feb 28, 2016 at 11:39 PM, Hongliang Liu notifications@github.com
wrote:

please use the visual studio solution file at windows for building from
github: pip installation currently doesn't support windows for now.


Reply to this email directly or view it on GitHub
#894 (comment).

@plentsov
Copy link

plentsov commented Mar 1, 2016

I followed this instruction and it has worked out!

http://stackoverflow.com/a/35119904/5996882

Good luck

@tqchen tqchen closed this as completed Mar 7, 2016
@MarkCao186
Copy link

No comment!

@majthehero
Copy link

Seems that this should be reopened - however, in the meantime, for fellow windows users this SO answer applies:
https://stackoverflow.com/a/41274589/1139633

@AdityaSoni19031997
Copy link

AdityaSoni19031997 commented Jul 16, 2018

Yes, i had built xgb for gpu on Windows x64, but now when i want to switch back to the non gpu version, its giving the same error

@hcho3
Copy link
Collaborator

hcho3 commented Jul 16, 2018

Let's post further questions at the forum https://discuss.xgboost.ai/.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants