{"id":173966,"date":"2024-05-08T18:22:26","date_gmt":"2024-05-08T10:22:26","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/173966.html"},"modified":"2024-05-08T18:22:30","modified_gmt":"2024-05-08T10:22:30","slug":"python3-6%e7%89%88%e6%9c%acscipy%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/173966.html","title":{"rendered":"python3.6\u7248\u672cscipy\u5982\u4f55\u5b89\u88c5"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27050041\/9a835717-cdb8-41fe-8778-9e2e82cc6b32.webp\" alt=\"python3.6\u7248\u672cscipy\u5982\u4f55\u5b89\u88c5\" \/><\/p>\n<p><p><strong>Python 3.6\u7248\u672c\u7684Scipy\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b89\u88c5\uff0c\u5305\u62ec\u4f7f\u7528pip\u5305\u7ba1\u7406\u5668\u3001Anaconda\u5206\u53d1\u7248\u3001\u6e90\u4ee3\u7801\u7f16\u8bd1\u3001\u64cd\u4f5c\u7cfb\u7edf\u7684\u5305\u7ba1\u7406\u5668\u7b49\u65b9\u6cd5\u3002<\/strong> \u4ee5pip\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e0b\u8f93\u5165<code>pip install scipy<\/code>\u6765\u5b89\u88c5Scipy\u5305\u3002\u5728Anaconda\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>conda install scipy<\/code>\u5b89\u88c5\u3002\u82e5\u9700\u8981\u4ece\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5\uff0c\u9700\u5148\u4e0b\u8f7dScipy\u7684\u6e90\u4ee3\u7801\u538b\u7f29\u5305\uff0c\u7136\u540e\u89e3\u538b\u7f29\u5e76\u4f7f\u7528<code>python setup.py install<\/code>\u6307\u4ee4\u6765\u7f16\u8bd1\u548c\u5b89\u88c5\u3002\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u65f6\uff0c\u4f8b\u5982Ubuntu\u4e0b\u7684<code>apt-get install python3-scipy<\/code>\uff0c\u53ef\u4ee5\u76f4\u63a5\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u5c06\u7ec6\u81f4\u8ba8\u8bba<strong>\u4f7f\u7528pip\u8fdb\u884c\u5b89\u88c5<\/strong>\u8fd9\u4e00\u5e38\u89c1\u4e14\u7b80\u4fbf\u7684\u65b9\u6cd5\u3002 <\/p>\n<\/p>\n<p><p>\u4e00\u3001<strong>\u4f7f\u7528PIP\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>Pip\u662fPython\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5141\u8bb8\u7528\u6237\u5feb\u901f\u5b89\u88c5\u3001\u5378\u8f7dPython\u8f6f\u4ef6\u5305\u3002\u4e3a\u4e86\u786e\u4fddpip\u547d\u4ee4\u53ef\u4ee5\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u4f7f\u7528\uff0c\u8bf7\u5148\u786e\u4fddPython\u53capip\u5df2\u6b63\u786e\u5b89\u88c5\u5728\u4f60\u7684\u7cfb\u7edf\u4e0a\u3002\u4f7f\u7528pip\u5b89\u88c5Scipy\u53ea\u9700\u8981\u7b80\u5355\u7684\u4e00\u884c\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install scipy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u5df2\u5177\u5907Python\u4e0epip\uff0c\u8fd9\u884c\u547d\u4ee4\u4f1a\u4ecePython\u5305\u7d22\u5f15\uff08PyPI\uff09\u4e0b\u8f7d\u6700\u5408\u9002\u7684Scipy\u7248\u672c\u5e76\u5b89\u88c5\u5728\u4f60\u7684\u7cfb\u7edf\u4e0a\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001<strong>\u4f7f\u7528Anaconda\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Python\u548cR\u8bed\u8a00\u53d1\u884c\u7248\u672c\uff0c\u4e3a\u79d1\u5b66\u8ba1\u7b97\u6240\u8bbe\u8ba1\u3002\u5b83\u9884\u88c5\u4e86\u8bb8\u591a\u5e38\u7528\u7684\u79d1\u5b66\u8ba1\u7b97\u5305\uff0cScipy\u4e5f\u5305\u542b\u5176\u4e2d\u3002\u5982\u679c\u4f60\u5df2\u5b89\u88c5Anaconda\uff0c\u53ea\u9700\u8981\u6253\u5f00Anaconda\u7684\u547d\u4ee4\u884c\u754c\u9762\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda install scipy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6761\u547d\u4ee4\u4f1a\u4eceAnaconda Repository\u4e2d\u627e\u5230\u5339\u914d\u4f60Python\u7248\u672c\u7684Scipy\u5305\uff0c\u5e76\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001<strong>\u4ece\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u9700\u8981\u6700\u65b0\u7684Scipy\u7248\u672c\u6216\u8005\u662f\u56e0\u4e3a\u7f51\u7edc\u95ee\u9898\u65e0\u6cd5\u901a\u8fc7pip\u6216\u8005Anaconda\u5b89\u88c5\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u4ece\u6e90\u4ee3\u7801\u6765\u7f16\u8bd1\u5b89\u88c5Scipy\u3002\u9996\u5148\uff0c\u8bbf\u95eeScipy\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7684\u6e90\u4ee3\u7801\u538b\u7f29\u5305\u6216\u8005\u901a\u8fc7Git clone\u5176\u4ee3\u7801\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u5728\u7f16\u8bd1\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u4e86NumPy\u548c\u5fc5\u987b\u7684\u7f16\u8bd1\u5de5\u5177\uff0c\u4f8b\u5982C\u7f16\u8bd1\u5668\u3002\u7136\u540e\uff0c\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">tar -xvzf scipy-XX.X.X.tar.gz<\/p>\n<p>cd scipy-XX.X.X<\/p>\n<p>python setup.py install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e9b\u547d\u4ee4\u4f1a\u9996\u5148\u89e3\u538bScipy\u6e90\u4ee3\u7801\u538b\u7f29\u5305\uff0c\u7136\u540e\u8fdb\u5165\u76f8\u5e94\u7684\u76ee\u5f55\uff0c\u5e76\u5f00\u59cb\u7f16\u8bd1\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001<strong>\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u90e8\u5206\u64cd\u4f5c\u7cfb\u7edf\u7684\u8f6f\u4ef6\u4ed3\u5e93\u4e2d\u4e5f\u5305\u542b\u4e86Scipy\u5305\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7cfb\u7edf\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u3002\u4f8b\u5982\uff0c\u5728\u57fa\u4e8eDebian\u7684\u7cfb\u7edf\uff08\u5982Ubuntu\uff09\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get update<\/p>\n<p>sudo apt-get install python3-scipy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8bf7\u6ce8\u610f\uff0c\u901a\u8fc7\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u7684Scipy\u7248\u672c\u53ef\u80fd\u4e0d\u662f\u6700\u65b0\u7684\uff0c\u4f46\u901a\u5e38\u4f1a\u6709\u6bd4\u8f83\u597d\u7684\u7cfb\u7edf\u517c\u5bb9\u6027\u3002<\/p>\n<\/p>\n<p><p><strong>\u7efc\u4e0a\u6240\u8ff0\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728Python 3.6\u7248\u672c\u4e0a\u5b89\u88c5Scipy\u5e93\u3002\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0cpip\u548cAnaconda\u662f\u6700\u65b9\u4fbf\u5feb\u6377\u7684\u9009\u62e9\uff0c\u800c\u6e90\u4ee3\u7801\u7f16\u8bd1\u9002\u7528\u4e8e\u9700\u8981\u6700\u65b0\u7279\u6027\u6216\u5bf9\u5b89\u88c5\u6709\u7279\u6b8a\u9700\u6c42\u7684\u7528\u6237\u3002\u4f7f\u7528\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u7684\u65b9\u6cd5\u7b80\u5355\u5feb\u901f\uff0c\u4f46\u53ef\u80fd\u4f1a\u727a\u7272\u4e00\u4e9b\u8f6f\u4ef6\u7684\u66f4\u65b0\u6027\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u5982\u4f55\u5728Python3.6\u7248\u672c\u4e2d\u5b89\u88c5SciPy\uff1f<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Q\uff1a\u6211\u5728Python3.6\u7248\u672c\u4e2d\u5b89\u88c5SciPy\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u8be5\u600e\u4e48\u529e\uff1f<\/strong><\/p>\n<ul>\n<li>A\uff1a\u5982\u679c\u5728\u5b89\u88c5SciPy\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u51e0\u4e2a\u89e3\u51b3\u65b9\u6848\uff1a\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Python\u7248\u672c\u662f\u6700\u65b0\u7684\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u5347\u7ea7\u5230\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002\u5176\u6b21\uff0c\u68c0\u67e5\u4f60\u7684\u7f51\u7edc\u8fde\u63a5\u662f\u5426\u6b63\u5e38\uff0c\u7531\u4e8eSciPy\u662f\u901a\u8fc7\u4e92\u8054\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5\u7684\uff0c\u7f51\u7edc\u95ee\u9898\u53ef\u80fd\u5bfc\u81f4\u5b89\u88c5\u5931\u8d25\u3002\u6700\u540e\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u5176\u4ed6\u7684\u5b89\u88c5\u65b9\u6cd5\uff0c\u6bd4\u5982\u4f7f\u7528Anaconda\u8fd9\u4e00\u79d1\u5b66\u8ba1\u7b97\u5de5\u5177\u5305\u6765\u5b89\u88c5SciPy\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Q\uff1a\u4e3a\u4ec0\u4e48\u6211\u65e0\u6cd5\u76f4\u63a5\u5728Python3.6\u7248\u672c\u4e2d\u901a\u8fc7pip\u5b89\u88c5SciPy\uff1f<\/strong><\/p>\n<ul>\n<li>A\uff1a\u6709\u51e0\u79cd\u53ef\u80fd\u7684\u539f\u56e0\u5bfc\u81f4\u4f60\u65e0\u6cd5\u76f4\u63a5\u901a\u8fc7pip\u5b89\u88c5SciPy\u3002\u9996\u5148\uff0c\u53ef\u80fd\u662f\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u800c\u65e0\u6cd5\u8fde\u63a5\u5230SciPy\u7684\u5b89\u88c5\u6e90\u3002\u5176\u6b21\uff0c\u4f60\u7684Python\u73af\u5883\u53ef\u80fd\u6ca1\u6709\u6b63\u786e\u914d\u7f6e\uff0c\u5bfc\u81f4pip\u65e0\u6cd5\u627e\u5230SciPy\u7684\u5b89\u88c5\u5305\u3002\u6700\u540e\uff0c\u6211\u4eec\u5efa\u8bae\u4f60\u68c0\u67e5\u4f60\u6240\u4f7f\u7528\u7684pip\u7248\u672c\u662f\u5426\u662f\u6700\u65b0\u7684\uff0c\u5e76\u5c1d\u8bd5\u66f4\u65b0pip\u540e\u518d\u6b21\u5c1d\u8bd5\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Q\uff1a\u6709\u6ca1\u6709\u5176\u4ed6\u7684\u5b89\u88c5\u65b9\u6cd5\u53ef\u4ee5\u5728Python3.6\u7248\u672c\u4e2d\u5b89\u88c5SciPy\uff1f<\/strong><\/p>\n<ul>\n<li>A\uff1a\u9664\u4e86\u4f7f\u7528pip\u5b89\u88c5\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728Python3.6\u7248\u672c\u4e2d\u5b89\u88c5SciPy\u3002\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528Anaconda\u8fd9\u4e00\u79d1\u5b66\u8ba1\u7b97\u5de5\u5177\u5305\uff0c\u5b83\u5df2\u7ecf\u9884\u5148\u6253\u5305\u4e86SciPy\u548c\u5176\u4ed6\u5e38\u7528\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\u3002\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u624b\u52a8\u4e0b\u8f7dSciPy\u7684\u6e90\u4ee3\u7801\uff0c\u7136\u540e\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u884c\u5b89\u88c5\u3002\u8fd9\u79cd\u65b9\u6cd5\u9700\u8981\u4f60\u5177\u5907\u4e00\u5b9a\u7684\u7f16\u8bd1\u548c\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u7ecf\u9a8c\uff0c\u4f46\u5b83\u7ed9\u4e86\u4f60\u66f4\u591a\u7684\u7075\u6d3b\u6027\u548c\u81ea\u5b9a\u4e49\u9009\u9879\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"Python 3.6\u7248\u672c\u7684Scipy\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b89\u88c5\uff0c\u5305\u62ec\u4f7f\u7528pip\u5305\u7ba1\u7406\u5668\u3001Anaconda\u5206\u53d1\u7248\u3001\u6e90\u4ee3 [&hellip;]","protected":false},"author":3,"featured_media":173974,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/173966"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=173966"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/173966\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/173974"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=173966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=173966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=173966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}