我已经成功地使用pip for python2.7.16安装了xgboost(我在macOS High Sierra上使用自制程序安装了这个Python版本)。我的问题是无法在Python中导入xgboost,错误消息如下:mac-128644:~ user$ python
Python 2.7.16 (default, Apr 12 2019, 15:32:52)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xgboost
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/xgboost/__init__.py", line 11, in
from .core import DMatrix, Booster
File "/usr/local/lib/python2.7/site-packages/xgboost/core.py", line 163, in
_LIB = _load_lib()
File "/usr/local/lib/python2.7/site-packages/xgboost/core.py", line 154, in _load_lib
'Error message(s): {}\n'.format(os_error_list))
x