如何在Mac上的virtualenv中安装Python XGBoost软件包 [英] How to install Python XGBoost package in virtualenv on mac

查看:107
本文介绍了如何在Mac上的virtualenv中安装Python XGBoost软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在Mac上安装Python 2.7 XGBoost.我正在通过brew运行python的框架构建,并尝试安装到virtualenv中.我尝试了以下方法:

I have been trying to install Python 2.7 XGBoost on my mac. I am running a framework build of python via brew and trying to install into a virtualenv. I have tried the following methods:

  1. 在此处找到手动构建: https://github.com/dmlc/xgboost/blob/master/doc/build.md#python-package-installation

这将导致此错误:

error: Error: setup script specifies an absolute path:

/Users/username/git/xgboost/python-package/xgboost/../../lib/libxgboost.so

setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

我能够构建xgboost,但无法安装该软件包.文档讨论了需要disutils的问题,但我在任何地方都找不到.我尝试在disutils2上运行,但这没用.

I was able to build xgboost, but I cant install the package. The docs discuss needing disutils, but I can't find it anywhere. I tried running on disutils2, but that didn't work.

    在以下位置找到
  1. pip安装: https://pypi.python.org/pypi/xgboost/
  1. pip install found here: https://pypi.python.org/pypi/xgboost/

这将导致此错误:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/jj/7r79983d7jvcz_1y6w2n5v2m0000gn/T/pip-build-l4ak5P/xgboost/

推荐答案

从setup.py中删除"include_package_data = True"会有所帮助. 请参阅: https://github.com/django-salesforce/django-salesforce/Issues/19

Removing "include_package_data=True" from setup.py helps. See: https://github.com/django-salesforce/django-salesforce/issues/19

这篇关于如何在Mac上的virtualenv中安装Python XGBoost软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆