Меню Рубрики

Conda install xgboost windows

Как установить xgboost в Anaconda Python (платформа Windows)?

Я новый пользователь Python. Я скачал последнюю версию Anaconda 3 2.4.1 (Python 3.5) по ссылке ниже: https://www.continuum.io/downloads

Конфигурации моего ПК: Windows 10, 64-битная, 4 ГБ ОЗУ

Я потратил часы, пытаясь найти правильный способ загрузки пакета после сбоя «pip install xgboost» в командной строке Anaconda, но не смог найти какие-либо конкретные инструкции для Anaconda.

Кто-нибудь может помочь, как установить xgboost от Anaconda?

Самый простой способ (Работа для меня) — сделать следующее:

Вы получите список доступных для установки функций:

например, если вы хотите установить первый в списке mndrake/xgboost (для WINDOWS-64bits):

Если вы находитесь в системе Unix, вы можете выбрать любой другой пакет с » linux-64» справа.

Это исправило проблему для меня без проблем.

  1. Скачать пакет с этого сайта. Я скачал xgboost-0.6-cp36-cp36m-win_amd64.whl для Anaconda 3 (Python 3.6)
  2. Поместите пакет в каталог C:\
  3. Откройте Anaconda 3 подсказку
  4. Введите cd C:\
  5. Введите pip install C:\xgboost-0.6-cp36-cp36m-win_amd64.whl
  6. Наберите conda update scikit-learn

Я смог установить xgboost для Python в Windows вчера следуя этой ссылке. Но когда я пытался импортировать с помощью Anaconda, это не удалось. Я узнал, что это связано с тем, что Anaconda имеет различный дистрибутив Python. Затем я снова искал и нашел эту замечательную статью, которая сделала это!

Трюк после успешной установки для обычного Python, чтобы он работал для Anaconda, вам просто нужно вытащить приглашение Anaconda и cd в эту папку «code\xgboost\python-package», а затем запустить:

И вуаля! В статье говорится, что вам нужно добавить путь, но для меня это работало напрямую. Удачи!

Также копируется ниже исходного содержимого в случае, если ссылка недоступна.

Как только последняя команда завершится, сборка будет выполнена. Теперь мы можем установить модуль Python. Следующее зависит от распределения Python ты используешь. Для Anaconda я просто использую подсказку Anaconda, и введите в него следующее (после подсказки, в моем случае [Anaconda3] C:\Users\IBM_ADMIN > ):

Мы почти закончили. Позвольте запустить ноутбук для тестирования XGBoost. Импортирование напрямую приводит к ошибке. Чтобы этого избежать, мы должны добавьте путь к библиотекам среды исполнения g++ в путь среды os переменная с:

Затем мы можем импортировать xgboost и запустить небольшой пример.

Я могу установить с помощью следующих команд (в Windows 10):

После того, как я попробовал кое-что, единственное, что сработало для меня, это:

Вы можете загрузить пакет xgboost на свой локальный компьютер, и лучше разместить исходный файл xgboost под D:\или C:\(ps: адрес загрузки: http://www.lfd.uci.edu/

gohlke/pythonlibs/#xgboost и выберите » xgboost-0.6-cp35-cp35m-win_amd64.whl«, но это зависит от вашей операционной системы), и вы открываете приглашение Anaconda, введите «pip install D:\xgboost-0.6-cp35-cp35m-win_amd64.whl», затем вы можете успешно установить xgboost в свою anaconda

ГОВОРИТ, ЧТО НЕ ЭТО ЛЕГКО: — ПОЖАЛУЙСТА, СЛЕДУЙТЕ СЛЕДУЮЩИЙ ШАГ, ЧТОБЫ ПОЛУЧИТЬ МАРК

Итак, вот что я сделал, чтобы закончить 64-битную сборку в Windows:

Загрузите и установите MinGW-64: sourceforge.net/projects/mingw-w64/

На первом экране инсталляции убедитесь, что вы установили для архитектуры x86_64 и Threads в win32 Я установил в C:\mingw64 (чтобы избежать пробелов в пути к файлу), поэтому я добавил это в свою переменную среды PATH: C:\mingw64\mingw64\bin (удалите пробелы)

Я также заметил, что утилита make, которая включена в bin\mingw64, называется mingw32-make, поэтому для упрощения вещей я просто переименовал ее, чтобы сделать

Откройте командную строку Windows и введите gcc. Вы должны увидеть что-то вроде «фатальной ошибки: нет входного файла»

Следующий тип make. Вы должны увидеть что-то вроде «Нет заданных целей и не найден файл makefile»

Введите git. Если у вас нет git, установите его и добавьте в свой PATH. Это должны быть все инструменты, необходимые для создания проекта xgboost. Чтобы получить исходный код, выполните следующие строки:

Источник

xgboost installation issue with anaconda

I am using Anaconda. I first switched to Python2 (Version 2.7.11).

I used the following command to install xgboost in anaconda.

I then checked that xgboost is installed.

I run python in terminal, import xgboost and got the following errors.

I have no idea what to do next.

7 Answers 7

The package image you download is corrupt. What you should do :

First remove your xgboost package with (in the terminal) :

Then reinstall with an other package at https://anaconda.org/aterrel/xgboost So just write :

Then you can check the installation in the python console :

» to see the dependencies for each package. – Taposh DuttaRoy Jan 18 ’17 at 1:05

I had the same error. I completely uninstalled xgboost by pip unistall. then installed it back by:

This seems to solve the problem

You first need to build the library through «make», then you can install using anaconda prompt.

First follow the official guide with the following procedure (in Git Bash on Windows):

Last, do the following using anaconda prompt:

Also refer to these great resources:

Did you try using pip?
source activate yourenvironment
pip install xgboost

Library not loaded: @rpath/./libgomp.1.dylib

In my case, it is » Library not loaded: /usr/local/opt/gcc/lib/gcc/6/libgomp.1.dylib»

I check my path «/usr/local/opt/gcc/lib/gcc» and there is only a folder named 7 there , no 6.
So i use «sudo find / -name libgomp.1.dylib» to locate all the gcc version i have installed, with I found that there is a version 6 in another location.
Then I create a folder named 6 under ‘/usr/local/opt/gcc/lib/gcc’ and copy those gcc 6 files in there . Finally , «import xgboost» works with no error .

Источник

Installing XGBoost on windows 10 (64 bit) with Anaconda Python Package

Algomaster

Jun 2, 2018 · 4 min read

XGBoost is an advanced implementation of gradient boosting that is being used to win many machine learning competitions.

It is compelling, but it can be hard to get started. Installing xgboost in windows can be very tedious task. In windows the xgboost package needs compiling. Here I put up a set of steps that will help in installing the library successfully.

My system’s specification: Windows 10, 64 bit ;Anaconda 5.2 ;Python 3.6

1. Install MingW64

MinGW-w64 — for 32 and 64 bit Windows

Download MinGW-w64 — for 32 and 64 bit Windows for free. A complete runtime environment for gcc. The mingw-w64 project…

sourceforge.net

After downloading ‘mingw-w64-install.exe’ start the installation by double clicking the file.

When running ming w -64-install.exe , you have to choose the x86_64 architecture on the settings screen. With this architecture, 64-bit is also the default target.Do not modify the other settings.

Then Click on Next and Make sure you install it in program files and not program Files (x86).

Add a windows path to the folder where you installed mingw-w64 as shown below:

i. Open Advanced System Settings then click on Environment Variables.

ii. Select Path and Click on Edit

iii. Add path into environment variable as shown below and then click on OK.

2. Download and install git for windows

Download git for windows .Follow instructions in link.

Git for Windows

We bring the awesome Git VCS to Windows

git-for-windows.github.io

If Git Bash terminal is open then close the Git Bash terminal, and launch it again. This will take into account the new Path variable. To check you are fine, type the following

It should return something like:

3. Install xgboost

  • Briefly, from git command line go to the directory where you want the xgboost folder to be copied to and type:
  • cd into the xgboost folder and type the following in the git console:

It will take a long while to compile. After it finishes compiling open the anaconda prompt (command line).

4. Install python bindings

Hopefully you installed the anaconda version of python.You can download anaconda from https://www.anaconda.com/download/.

Open Anaconda prompt(command line) and cd into the xgboost folder:

Note: Here ‘C:\xgboost’ is Xgboost install directory in my PC.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Concurrent rdp patcher windows 10
  • Computer id как узнать windows 10
  • Computer connector для windows 10
  • Computer configuration windows 7 где это
  • Computer browser windows 7