Sistema operativo: Windows 7
Compilador: MSVC ++ 12 (Visual Studio 2013)
Paquete utilizado (python / R / jvm / C ++): Python 3.4.4
xgboost
versión utilizada: 0.6
Si está instalando desde la fuente, proporcione
git rev-parse HEAD
): e7fbc8591fa7277ee4c474b7371c48c11b34cbdeInstall libxgboost from: ['C:\\Python34\\XGBoost\\python-package\\xgboost\\../..
/lib/libxgboost.dll']
running install
running bdist_egg
running egg_info
writing requirements to xgboost.egg-info\requires.txt
writing xgboost.egg-info\PKG-INFO
writing dependency_links to xgboost.egg-info\dependency_links.txt
writing top-level names to xgboost.egg-info\top_level.txt
reading manifest file 'xgboost.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'xgboost\include'
warning: no files found matching '*' under directory 'xgboost\src'
warning: no files found matching '*' under directory 'xgboost\make'
warning: no files found matching '*' under directory 'xgboost\rabit'
warning: no files found matching '*' under directory 'xgboost\lib'
warning: no files found matching '*' under directory 'xgboost\dmlc-core'
warning: no previously-included files matching '*.o' found anywhere in distribution
warning: no previously-included files matching '*.a' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'xgboost.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
error: Error: setup script specifies an absolute path:
C:\Python34\XGBoost\python-package\xgboost\..\..\lib\libxgboost.dll
setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.
Si está utilizando el paquete de Python, proporcione
xgboost
si no está instalando desde la fuente - python.exe setup.py install
(a través de setuptools)LIB_PATH = libpath['find_lib_path']()
LIB_PATH = ['../lib/libxgboost.dll']
También encontré este error en centos 6.5 64. Busco soluciones y decido editar el paquete python / setup.py.
Simplemente establezca 38º "include_package_data = False" y luego ejecuto "python setup.py install" con éxito. Finalmente, "importar xgboost como xgb" es correcto. Sin embargo, ejecuté la demostración, volví a encontrar errores.
Finalmente limpio los archivos y luego reconstruyo el xgboost nuevamente. ¡Para ejecutar la instalación de Python y ahora está bien!
31/12/2016:
cuando instalo xgboost en centos 7 x86_64, encontré este error nuevamente. Sin embargo, volví a compilar el xgboost y no pude instalar Python.
Intento compilar make o cmake, ambos están bien. Pero cuando instalo Python y encuentro el mismo error.
Me pregunto por qué no es bueno en centos 7, solo por la versión.
@anddelu include_package_data=False
es imprescindible ya que usa MANIFEST.in
para el mantenimiento del paquete y esto solo afecta la instalación, no la ruta. Creo que su último paso para reconstruir xgboost es la solución correcta donde include_package_data=False
debería permanecer como está.
Me estaba encontrando con el mismo error en Linux con Anaconda Python 3.5.
Creo que lo arreglé haciendo las siguientes modificaciones en setup.py:
diff --git a/python-package/setup.py b/python-package/setup.py
index 27fc212..ec9b806 100644
--- a/python-package/setup.py
+++ b/python-package/setup.py
@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
# import subprocess
sys.path.insert(0, '.')
-CURRENT_DIR = os.path.dirname(__file__)
+CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
# We can not import `xgboost.libpath` in setup.py directly since xgboost/__init__.py
# import `xgboost.core` and finally will import `numpy` and `scipy` which are setup
@@ -17,6 +17,7 @@ libpath = {'__file__': libpath_py}
exec(compile(open(libpath_py, "rb").read(), libpath_py, 'exec'), libpath, libpath)
LIB_PATH = libpath['find_lib_path']()
+LIB_PATH = [os.path.relpath(LIB_PATH[0], CURRENT_DIR)]
print("Install libxgboost from: %s" % LIB_PATH)
# Please use setup_pip.py for generating and deploying pip installation
# detailed instruction in setup_pip.py
Comentario más útil
También encontré este error en centos 6.5 64. Busco soluciones y decido editar el paquete python / setup.py.
Simplemente establezca 38º "include_package_data = False" y luego ejecuto "python setup.py install" con éxito. Finalmente, "importar xgboost como xgb" es correcto. Sin embargo, ejecuté la demostración, volví a encontrar errores.
Finalmente limpio los archivos y luego reconstruyo el xgboost nuevamente. ¡Para ejecutar la instalación de Python y ahora está bien!
31/12/2016:
cuando instalo xgboost en centos 7 x86_64, encontré este error nuevamente. Sin embargo, volví a compilar el xgboost y no pude instalar Python.
Intento compilar make o cmake, ambos están bien. Pero cuando instalo Python y encuentro el mismo error.
Me pregunto por qué no es bueno en centos 7, solo por la versión.