【问题标题】:How to install xgboost for python3.6 in mac如何在mac中为python3.6安装xgboost
【发布时间】:2017-09-18 19:54:06
【问题描述】:

我已经按照下面的方法link在mac上安装了。

当我运行以下命令时,我得到输出 gcc 7.2.0 already installed

brew install gcc

之后我在 make 文件夹中配置了 config.mk 文件,因为我安装了 7.2.0 gcc。

export CC = gcc-7

export CXX = g++-7

一旦我更改了 config.mk 文件,我就会运行以下命令 make clean_all && make -j4

然后我运行cd python-package; python setup.py install

如果没有关闭终端,我会转到 python3.6,在那里我可以毫无问题地访问 xgboost。但是,当我切换到不同的终端时,我收到以下错误

OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgomp.1.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so
  Reason: image not found

任何想法为什么会发生,如何解决它?

【问题讨论】:

标签: python macos gcc xgboost


【解决方案1】:
$ brew install gcc@5
$ pip install xgboost

它对我有用。[xgboost==0.6a2]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-29
    • 2019-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 2016-08-26
    • 2016-07-02
    相关资源
    最近更新 更多