ImportError: No module named xgboost
ImportError: No module named xgboost
当我尝试从Python终端导入时,尽管我按照安装xgboost的所有步骤操作,但Python无法获取包的详细信息。我对Python相对陌生,但我可以轻松安装numpy和pandas包,我使用了这个链接在MACOSX上进行安装 http://xgboost.readthedocs.io/en/latest/build.html
>>> import xgboost Traceback (most recent call last): File "", line 1, in ImportError: No module named xgboost
当我使用pip install xgboost时,我得到了以下错误:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/h7/pyph_7qj6171tqp50cf2xc7m0000gn/T/pip-build-TEvbD6/xgboost/
打印sys路径时,我得到了以下结果:
print sys.path
['', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']