{"id":979,"date":"2020-01-28T22:42:30","date_gmt":"2020-01-28T13:42:30","guid":{"rendered":"https:\/\/obenkyolab.com\/?p=979"},"modified":"2022-01-07T07:09:32","modified_gmt":"2022-01-06T22:09:32","slug":"python-scikit-learn%e3%81%aeimporterror","status":"publish","type":"post","link":"https:\/\/obenkyolab.com\/?p=979","title":{"rendered":"Python scikit-learn\u306eImportError"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/obenkyolab.com\/?p=979\/#%E6%A6%82%E8%A6%81\" >\u6982\u8981<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/obenkyolab.com\/?p=979\/#%E6%A4%9C%E8%A8%BC%E7%92%B0%E5%A2%83\" >\u691c\u8a3c\u74b0\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/obenkyolab.com\/?p=979\/#%E7%99%BA%E7%94%9F%E3%81%97%E3%81%9F%E3%82%A8%E3%83%A9%E3%83%BC\" >\u767a\u751f\u3057\u305f\u30a8\u30e9\u30fc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/obenkyolab.com\/?p=979\/#%E5%AF%BE%E5%87%A6%E6%96%B9%E6%B3%95\" >\u5bfe\u51e6\u65b9\u6cd5<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A6%81\"><\/span>\u6982\u8981<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Anaconda3\u3067scikit-learn\u306edatasets\u306eimport\u6642\u306bImportError\u304c\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u305f\u3081\u3001\u5bfe\u51e6\u6cd5\u306b\u3064\u3044\u3066\u30e1\u30e2\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A4%9C%E8%A8%BC%E7%92%B0%E5%A2%83\"><\/span>\u691c\u8a3c\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>OS Windows10 <\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Anaconda<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ conda info\n--\n          conda version : 4.7.10\n    conda-build version : 3.18.8\n         python version : 3.7.3.final.0\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%99%BA%E7%94%9F%E3%81%97%E3%81%9F%E3%82%A8%E3%83%A9%E3%83%BC\"><\/span>\u767a\u751f\u3057\u305f\u30a8\u30e9\u30fc<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>python3\u306e\u30b3\u30fc\u30c9\u3068\u30a8\u30e9\u30fc\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom sklearn.datasets import load_iris\ndataset = load_iris()\n--\n\nImportError: DLL load failed: \u6307\u5b9a\u3055\u308c\u305f\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AF%BE%E5%87%A6%E6%96%B9%E6%B3%95\"><\/span>\u5bfe\u51e6\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Anaconda Prompt\u3092\u7ba1\u7406\u8005\u3068\u3057\u5b9f\u884c\u3057\u3001\u4ee5\u4e0b\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ pip install -U sklearn\n\n$ pip install -U numpy\n\n$ pip install -U scipy\n<\/pre><\/div>\n\n\n<p>\u4ee5\u4e0a\u3092\u884c\u3063\u305f\u7d50\u679c\u3001Import\u30a8\u30e9\u30fc\u306f\u51fa\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom sklearn.datasets import load_iris\ndataset = load_iris()\nprint(&quot;key of dataset:\\n{}&quot;.format(dataset.keys()))\n\n--\n\nkey of dataset:\ndict_keys(&#x5B;&#039;data&#039;, &#039;target&#039;, &#039;target_names&#039;, &#039;DESCR&#039;, &#039;feature_names&#039;, &#039;filename&#039;])\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 Anaconda3\u3067scikit-learn\u306edatasets&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/obenkyolab.com\/?p=979","footnotes":""},"categories":[7],"tags":[],"class_list":["post-979","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","ja"],"_links":{"self":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=979"}],"version-history":[{"count":4,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/979\/revisions"}],"predecessor-version":[{"id":3807,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/979\/revisions\/3807"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/media\/1218"}],"wp:attachment":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}