{"id":607,"date":"2020-11-23T19:34:54","date_gmt":"2020-11-23T19:34:54","guid":{"rendered":"http:\/\/feellikelearning.com\/?p=607"},"modified":"2020-11-27T20:46:01","modified_gmt":"2020-11-27T20:46:01","slug":"cn-how-to-install-xgboost-python-api-on-mac-os","status":"publish","type":"post","link":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/","title":{"rendered":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS?"},"content":{"rendered":"\n<p><strong>\u600e\u6837\u5b89\u88c5?<\/strong><\/p>\n\n\n\n<p>\u7528pip, \u4ee5python 3.7\u4e3a\u4f8b\u5b50. \u6700\u597d\u4f7f\u7528virtual environment.<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-code\"><code>$ pip install xgboost\n$ pip install sklearn\n$ pip install libomp<\/code><\/pre>\n\n\n\n<p>sklearn\u662fscikit learn, \u4e0d\u662f\u5fc5\u8981, \u4e0d\u8fc7\u91cc\u9762\u6709\u4e9b\u5f88\u6709\u7528\u7684function, \u6bd4\u5982split training and evaluation data. <\/p>\n\n\n\n<p>libomp\u662fOpenMp, \u662fxgboost package\u7684\u4e00\u4e2adependency. \u4e0d\u88c5\u5728Mac\u4e0a\u8dd1\u4e0d\u4e86xgboost. <\/p>\n\n\n\n<p><strong>\u600e\u6837\u786e\u8ba4\u5b89\u88c5\u6210\u529f?<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Python 3.7.3 (default, Apr  7 2020, 14:06:47)\n[Clang 11.0.3 (clang-1103.0.32.59)] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import xgboost\n>>><\/code><\/pre>\n\n\n\n<p>\u5982\u679cimport\u6210\u529f\u6ca1\u6709error, \u5c31\u662f\u6210\u529f\u4e86. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u600e\u6837\u5b89\u88c5? \u7528pip, \u4ee5python 3.7\u4e3a\u4f8b\u5b50. \u6700\u597d\u4f7f\u7528virtual environment.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[10,7,3],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning\" \/>\n<meta property=\"og:description\" content=\"\u600e\u6837\u5b89\u88c5? \u7528pip, \u4ee5python 3.7\u4e3a\u4f8b\u5b50. \u6700\u597d\u4f7f\u7528virtual environment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\" \/>\n<meta property=\"og:site_name\" content=\"Feel Like Learning\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-23T19:34:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-27T20:46:01+00:00\" \/>\n<meta name=\"author\" content=\"feellikelearning\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"feellikelearning\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#article\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\"},\"author\":{\"name\":\"feellikelearning\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"headline\":\"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS?\",\"datePublished\":\"2020-11-23T19:34:54+00:00\",\"dateModified\":\"2020-11-27T20:46:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\"},\"wordCount\":34,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"articleSection\":[\"Python\",\"\u673a\u5668\u5b66\u4e60\",\"\u7f16\u7a0b\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\",\"url\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\",\"name\":\"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/#website\"},\"datePublished\":\"2020-11-23T19:34:54+00:00\",\"dateModified\":\"2020-11-27T20:46:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/feellikelearning.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/feellikelearning.com\/#website\",\"url\":\"https:\/\/feellikelearning.com\/\",\"name\":\"Feel Like Learning\",\"description\":\"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230\",\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/feellikelearning.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\",\"name\":\"feellikelearning\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"caption\":\"feellikelearning\"},\"logo\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant","og_locale":"en_US","og_type":"article","og_title":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning","og_description":"\u600e\u6837\u5b89\u88c5? \u7528pip, \u4ee5python 3.7\u4e3a\u4f8b\u5b50. \u6700\u597d\u4f7f\u7528virtual environment.","og_url":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant","og_site_name":"Feel Like Learning","article_published_time":"2020-11-23T19:34:54+00:00","article_modified_time":"2020-11-27T20:46:01+00:00","author":"feellikelearning","twitter_card":"summary_large_image","twitter_misc":{"Written by":"feellikelearning"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#article","isPartOf":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant"},"author":{"name":"feellikelearning","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"headline":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS?","datePublished":"2020-11-23T19:34:54+00:00","dateModified":"2020-11-27T20:46:01+00:00","mainEntityOfPage":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant"},"wordCount":34,"commentCount":0,"publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"articleSection":["Python","\u673a\u5668\u5b66\u4e60","\u7f16\u7a0b"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#respond"]}]},{"@type":"WebPage","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant","url":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant","name":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS? | Feel Like Learning","isPartOf":{"@id":"https:\/\/feellikelearning.com\/#website"},"datePublished":"2020-11-23T19:34:54+00:00","dateModified":"2020-11-27T20:46:01+00:00","breadcrumb":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/11\/23\/cn-how-to-install-xgboost-python-api-on-mac-os\/?variant=zh-hant#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/feellikelearning.com\/"},{"@type":"ListItem","position":2,"name":"\u600e\u6837\u5728Mac\u4e0a\u5b89\u88c5python\u7248\u672c\u7684xgboost? | how to install xgboost (python API) on Mac OS?"}]},{"@type":"WebSite","@id":"https:\/\/feellikelearning.com\/#website","url":"https:\/\/feellikelearning.com\/","name":"Feel Like Learning","description":"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230","publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/feellikelearning.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a","name":"feellikelearning","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","caption":"feellikelearning"},"logo":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/"},"url":"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/"}]}},"_links":{"self":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/607"}],"collection":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":3,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"predecessor-version":[{"id":754,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/607\/revisions\/754"}],"wp:attachment":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}