gpt4 book ai didi

python xgboost 在 mac 安装

转载 作者:太空狗 更新时间:2023-10-29 22:29:48 28 4
gpt4 key购买 nike

我正在尝试在我的 Mac 上为 Python 3.4 安装 xgboost,但在 pip3 setup.py install 之后出现以下错误:

  File "<string>", line 20, in <module>

File "/private/var/folders/_x/rkkz7tjj42g9n8lqq5r0ry000000gn/T/pip-build-2dc6bwf7/xgboost/setup.py", line 28, in <module>

execfile(libpath_py, libpath, libpath)

NameError: name 'execfile' is not defined

当使用 -v 选项运行它以获得详细输出时,错误如下所示:

  Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_x/rkkz7tjj42g9n8lqq5r0ry000000gn/T/pip-build-2dc6bwf7/xgboost
Exception information:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 385, in prepare_files
req_to_install.run_egg_info()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/req/req_install.py", line 358, in run_egg_info
command_desc='python setup.py egg_info')
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/utils/__init__.py", line 749, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_x/rkkz7tjj42g9n8lqq5r0ry000000gn/T/pip-build-2dc6bwf7/xgboost

我该如何解决这个问题?

最佳答案

这对我有用。

操作系统:OSX El Capitan

第一步:cd xgboost; ./build.sh
第 2 步:cd python-package; python setup.py 安装

关于python xgboost 在 mac 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32838959/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com