How to install xgboost in Anaconda Python (Windows platform)?

前端 未结 21 2472
北恋
北恋 2020-11-30 19:25

I am a new Python user. I downloaded the latest Anaconda 3 2.4.1 (Python 3.5) from the below link: https://www.continuum.io/downloads

My PC Configurations are: Windo

相关标签:
21条回答
  • 2020-11-30 19:58

    Use this in your conda prompt:

    python -m pip install xgboost
    
    0 讨论(0)
  • 2020-11-30 19:59

    There are a lot of dependencies of anaconda that have changed over the past years and won't work if you used them now. Some of the answers need serious updation.

    I found this command did the job for me :

    conda install -c conda-forge xgboost
    

    You may also want to look at the official documentation of anaconda for xgboost:

    https://anaconda.org/conda-forge/xgboost

    0 讨论(0)
  • 2020-11-30 20:01
    1. Download package from this website. I downloaded xgboost-0.6-cp36-cp36m-win_amd64.whl for anaconda 3 (python 3.6)
    2. Put the package in directory C:\
    3. Open anaconda 3 prompt
    4. Type cd C:\
    5. Type pip install C:\xgboost-0.6-cp36-cp36m-win_amd64.whl
    6. Type conda update scikit-learn
    0 讨论(0)
  • 2020-11-30 20:01

    This simple helped me you don't have to include anything at the end because if you include something, some of your packages will be upgraded but some will be downgraded. You can get this from this url: https://anaconda.org/anaconda/py-xgboost

    conda install -c anaconda py-xgboost 
    
    0 讨论(0)
  • 2020-11-30 20:03

    I'm able to install using the following commands (in Windows 10) :

    conda install -c mikesilva xgboost
    
    conda install -c conda-forge xgboost
    
    0 讨论(0)
  • 2020-11-30 20:03

    I have used this command and it worked for me.

    import sys
    !{sys.executable} -m pip install xgboost
    
    0 讨论(0)
提交回复
热议问题