Betriebssystem: Windows 7
Compiler: MSVC++ 12 (Visual Studio 2013)
Verwendetes Paket (python/R/jvm/C++): Python 3.4.4
xgboost
Version: 0.6
Wenn Sie von der Quelle installieren, geben Sie bitte an
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.
Wenn Sie ein Python-Paket verwenden, geben Sie bitte an
xgboost
wenn Sie nicht von der Quelle installieren - python.exe setup.py install
(über Setuptools)LIB_PATH = libpath['find_lib_path']()
LIB_PATH = ['../lib/libxgboost.dll']
Ich bin auch auf diesen Fehler in centos 6.5 64 gestoßen. Ich suche nach Lösungen und beschließe, das python-package/setup.py zu bearbeiten.
Setze einfach 38. "include_package_data=False" dann führe ich "python setup.py install" erfolgreich aus. Schließlich ist "xgboost als xgb importieren" korrekt. Wie auch immer, ich führe die Demo aus, ich bin wieder auf Fehler gestoßen.
Schließlich bereinige ich die Dateien und baue dann den xgboost wieder neu auf. Python installieren und jetzt ist es in Ordnung!
31.12.2016:
Wenn ich xgboost in centos 7 x86_64 installiere, ist dieser Fehler erneut aufgetreten. Ich habe jedoch xgboost neu kompiliert und konnte Python nicht installieren.
Ich versuche make oder cmake zu kompilieren, beide sind in Ordnung. Aber wenn ich Python installiere und den gleichen Fehler erhalte.
Ich frage mich nur, warum es in Centos 7 nicht gut ist, nur wegen der Version.
@anddelu include_package_data=False
ist ein Muss, da es MANIFEST.in
für die Paketwartung verwendet und dies nur die Installation betrifft, nicht den Pfad. Ich denke, Ihr letzter Schritt zum Neuaufbau von xgboost ist die richtige Lösung, bei der include_package_data=False
so bleiben sollte, wie es ist.
Ich hatte den gleichen Fehler unter Linux mit Anaconda Python 3.5.
Ich glaube, ich habe es behoben, indem ich die folgenden Änderungen an setup.py vorgenommen habe:
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
Hilfreichster Kommentar
Ich bin auch auf diesen Fehler in centos 6.5 64 gestoßen. Ich suche nach Lösungen und beschließe, das python-package/setup.py zu bearbeiten.
Setze einfach 38. "include_package_data=False" dann führe ich "python setup.py install" erfolgreich aus. Schließlich ist "xgboost als xgb importieren" korrekt. Wie auch immer, ich führe die Demo aus, ich bin wieder auf Fehler gestoßen.
Schließlich bereinige ich die Dateien und baue dann den xgboost wieder neu auf. Python installieren und jetzt ist es in Ordnung!
31.12.2016:
Wenn ich xgboost in centos 7 x86_64 installiere, ist dieser Fehler erneut aufgetreten. Ich habe jedoch xgboost neu kompiliert und konnte Python nicht installieren.
Ich versuche make oder cmake zu kompilieren, beide sind in Ordnung. Aber wenn ich Python installiere und den gleichen Fehler erhalte.
Ich frage mich nur, warum es in Centos 7 nicht gut ist, nur wegen der Version.