{"id":961849,"date":"2024-12-27T04:02:38","date_gmt":"2024-12-26T20:02:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/961849.html"},"modified":"2024-12-27T04:02:41","modified_gmt":"2024-12-26T20:02:41","slug":"2019python%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/961849.html","title":{"rendered":"2019python\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\/25103949\/bfb51e71-336e-4296-a9bf-9e78e20bcb9f.webp\" alt=\"2019python\u5982\u4f55\u5b89\u88c5\" \/><\/p>\n<p><p> \u4e00\u3001\u56de\u7b54\u95ee\u9898<\/p>\n<\/p>\n<p><p><strong>2019\u5e74\uff0cPython\u7684\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\uff0c\u4e3b\u8981\u5305\u62ec\uff1a\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5982Anaconda\u3001\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5de5\u5177\u8fdb\u884c\u5b89\u88c5<\/strong>\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u4e3b\u8981\u53d6\u51b3\u4e8e\u7528\u6237\u7684\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u53ca\u4e2a\u4eba\u7684\u4f7f\u7528\u9700\u6c42\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u800c\u8a00\uff0c\u63a8\u8350\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u65b9\u6cd5\u7b80\u5355\u76f4\u63a5\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fdd\u5f97\u5230\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53ea\u9700\u8981\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u7684\u6b65\u9aa4\u8fdb\u884c\u5b89\u88c5\u5373\u53ef\uff0c\u8fd9\u4e9b\u6b65\u9aa4\u5305\u62ec\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u8be6\u7ec6\u63cf\u8ff0\uff1a\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\uff0c\u662f\u521d\u5b66\u8005\u6700\u5e38\u7528\u7684\u65b9\u5f0f\u4e4b\u4e00\u3002\u9996\u5148\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u9009\u62e9\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\uff0c\u5b89\u88c5\u8fc7\u7a0b\u901a\u5e38\u5305\u62ec\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u3001\u662f\u5426\u6dfb\u52a0Python\u5230\u7cfb\u7edf\u8def\u5f84\uff08\u5efa\u8bae\u52fe\u9009\u6b64\u9009\u9879\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\uff09\u7b49\u9009\u9879\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>python --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001Python\u5b89\u88c5\u7684\u591a\u79cd\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>1\u3001\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d<\/p>\n<\/p>\n<p><p>\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u662f\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5728\u5b98\u65b9\u7f51\u7ad9\u4e0a\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u5b89\u88c5\u6b65\u9aa4\u5305\u62ec\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u9009\u62e9\u5b89\u88c5\u76ee\u5f55\u3001\u9009\u62e9\u662f\u5426\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u7b49\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u53ef\u4ee5\u83b7\u5f97\u6700\u65b0\u7248\u672c\uff0c\u5e76\u4e14\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u9002\u5408\u5927\u591a\u6570\u7528\u6237\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u9009\u62e9\u5408\u9002\u7684\u7248\u672c<\/strong>\uff1aPython\u7684\u7248\u672c\u66f4\u65b0\u8f83\u5feb\uff0c\u7528\u6237\u5728\u4e0b\u8f7d\u65f6\u9700\u8981\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3002\u5bf9\u4e8e\u65b0\u7528\u6237\uff0c\u901a\u5e38\u5efa\u8bae\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002<\/li>\n<li><strong>\u5b89\u88c5\u9009\u9879<\/strong>\uff1a\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5\u8def\u5f84\uff0c\u5e76\u9009\u62e9\u662f\u5426\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u5efa\u8bae\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u3002<\/li>\n<\/ul>\n<p><p>2\u3001\u4f7f\u7528Anaconda<\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6570\u636e\u79d1\u5b66\u5e73\u53f0\uff0c\u5305\u542bPython\u548c\u5927\u91cf\u5e38\u7528\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\u3002\u5bf9\u4e8e\u9700\u8981\u8fdb\u884c\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7684\u7528\u6237\uff0cAnaconda\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5b83\u4e0d\u4ec5\u7b80\u5316\u4e86Python\u7684\u5b89\u88c5\u8fc7\u7a0b\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e2a\u96c6\u6210\u7684\u7ba1\u7406\u73af\u5883\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u5b89\u88c5Anaconda<\/strong>\uff1a\u4eceAnaconda\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u5e76\u6309\u7167\u6307\u5f15\u8fdb\u884c\u5b89\u88c5\u3002Anaconda\u4f1a\u81ea\u52a8\u5b89\u88c5Python\u548c\u5927\u91cf\u7684\u6570\u636e\u79d1\u5b66\u5e93\u3002<\/li>\n<li><strong>\u4f7f\u7528Anaconda<\/strong>\uff1a\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Anaconda\u63d0\u4f9b\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff08\u5982<code>conda<\/code>\uff09\u6765\u7ba1\u7406Python\u73af\u5883\u548c\u5e93\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>conda create<\/code>\u547d\u4ee4\u53ef\u4ee5\u521b\u5efa\u72ec\u7acb\u7684Python\u73af\u5883\uff0c\u65b9\u4fbf\u7ba1\u7406\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u3002<\/li>\n<\/ul>\n<p><p>3\u3001\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u8bb8\u591a\u64cd\u4f5c\u7cfb\u7edf\uff08\u5982Linux\uff09\u81ea\u5e26\u6709\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e9b\u5de5\u5177\u6765\u5b89\u88c5Python\u3002\u8fd9\u79cd\u65b9\u6cd5\u901a\u5e38\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u5b8c\u6210\u7684\uff0c\u9002\u5408\u6709\u4e00\u5b9a\u7ecf\u9a8c\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Linux\u7cfb\u7edf<\/strong>\uff1a\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982apt\u3001yum\u7b49\u6765\u5b89\u88c5Python\u3002\u4f8b\u5982\uff0c\u5728Debian\u7cfb\u7684\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sudo apt-get install python3<\/code>\u547d\u4ee4\u6765\u5b89\u88c5Python3\u3002<\/li>\n<li><strong>MacOS\u7cfb\u7edf<\/strong>\uff1a\u5728MacOS\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528Homebrew\u6765\u5b89\u88c5Python\u3002\u9996\u5148\u786e\u4fddHomebrew\u5df2\u7ecf\u5b89\u88c5\uff0c\u7136\u540e\u4f7f\u7528\u547d\u4ee4<code>brew install python<\/code>\u6765\u5b89\u88c5Python\u3002<\/li>\n<\/ul>\n<p><p>\u4e09\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>1\u3001\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u8bb8\u591a\u7528\u6237\u5728\u5b89\u88c5Python\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u73af\u5883\u53d8\u91cf\u672a\u6b63\u786e\u914d\u7f6e\u7684\u95ee\u9898\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u547d\u4ee4\u884c\u4e2d\u65e0\u6cd5\u8bc6\u522b<code>python<\/code>\u547d\u4ee4\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u624b\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u672a\u9009\u62e9\u81ea\u52a8\u6dfb\u52a0Python\u5230\u7cfb\u7edf\u8def\u5f84\uff0c\u7528\u6237\u53ef\u4ee5\u624b\u52a8\u914d\u7f6e\u3002\u5177\u4f53\u6b65\u9aa4\u662f\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684PATH\u53d8\u91cf\u4e2d\u3002<\/li>\n<li><strong>\u9a8c\u8bc1\u914d\u7f6e<\/strong>\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u5982\u679c\u80fd\u6b63\u786e\u663e\u793aPython\u7684\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660e\u914d\u7f6e\u6210\u529f\u3002<\/li>\n<\/ul>\n<p><p>2\u3001\u7248\u672c\u51b2\u7a81\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u7cfb\u7edf\u4e0a\uff0c\u53ef\u80fd\u4f1a\u5b58\u5728\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u8fd9\u53ef\u80fd\u5bfc\u81f4\u7248\u672c\u51b2\u7a81\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u7248\u672c\u7ba1\u7406\u5de5\u5177<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>pyenv<\/code>\u7b49\u7248\u672c\u7ba1\u7406\u5de5\u5177\u6765\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\u3002\u8fd9\u4e9b\u5de5\u5177\u5141\u8bb8\u7528\u6237\u8f7b\u677e\u5207\u6362\u4e0d\u540c\u7684Python\u7248\u672c\u3002<\/li>\n<li><strong>\u6307\u5b9a\u7248\u672c\u8fd0\u884c<\/strong>\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a<code>python3<\/code>\u6216<code>python2<\/code>\u6765\u660e\u786e\u4f7f\u7528\u54ea\u4e2a\u7248\u672c\u7684Python\u3002<\/li>\n<\/ul>\n<p><p>3\u3001\u4f9d\u8d56\u5e93\u5b89\u88c5\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u67d0\u4e9b\u4f9d\u8d56\u5e93\u65e0\u6cd5\u5b89\u88c5\u7684\u95ee\u9898\u3002\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u6216\u7f3a\u4e4f\u7f16\u8bd1\u5de5\u5177\u5bfc\u81f4\u7684\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u865a\u62df\u73af\u5883<\/strong>\uff1a\u901a\u8fc7\u4f7f\u7528Python\u7684\u865a\u62df\u73af\u5883\uff08\u5982<code>venv<\/code>\u6216<code>virtualenv<\/code>\uff09\uff0c\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u9879\u76ee\u521b\u5efa\u72ec\u7acb\u7684\u4f9d\u8d56\u73af\u5883\uff0c\u907f\u514d\u5168\u5c40\u73af\u5883\u7684\u5e93\u51b2\u7a81\u3002<\/li>\n<li><strong>\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u548c\u7f16\u8bd1\u5de5\u5177<\/strong>\uff1a\u786e\u4fdd\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u5e76\u5b89\u88c5\u5fc5\u8981\u7684\u7f16\u8bd1\u5de5\u5177\uff08\u5982GCC\u3001Make\u7b49\uff09\uff0c\u4ee5\u4fbf\u987a\u5229\u5b89\u88c5\u6240\u9700\u7684\u5e93\u3002<\/li>\n<\/ul>\n<p><p>\u56db\u3001Python\u5b89\u88c5\u540e\u7684\u914d\u7f6e\u4e0e\u4f18\u5316<\/p>\n<\/p>\n<p><p>1\u3001\u914d\u7f6epip\u548c\u5305\u7ba1\u7406\u5de5\u5177<\/p>\n<\/p>\n<p><p>pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u7684\u7b2c\u4e09\u65b9\u5e93\u3002\u5b89\u88c5Python\u540e\uff0c\u901a\u5e38\u9700\u8981\u914d\u7f6epip\u4ee5\u4fbf\u4e8e\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u5347\u7ea7pip<\/strong>\uff1a\u5efa\u8bae\u5728\u5b89\u88c5Python\u540e\uff0c\u9996\u5148\u8fd0\u884c<code>pip install --upgrade pip<\/code>\u547d\u4ee4\u6765\u5347\u7ea7pip\u5230\u6700\u65b0\u7248\u672c\u3002<\/li>\n<li><strong>\u914d\u7f6e\u955c\u50cf\u6e90<\/strong>\uff1a\u7531\u4e8e\u7f51\u7edc\u539f\u56e0\uff0c\u4f7f\u7528\u56fd\u5185\u955c\u50cf\u6e90\u53ef\u4ee5\u52a0\u5febpip\u7684\u4e0b\u8f7d\u901f\u5ea6\u3002\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539pip\u914d\u7f6e\u6587\u4ef6\u6765\u6307\u5b9a\u955c\u50cf\u6e90\u3002<\/li>\n<\/ul>\n<p><p>2\u3001\u5b89\u88c5\u5e38\u7528\u5e93<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u540e\uff0c\u901a\u5e38\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684\u5e93\u4ee5\u4fbf\u5f00\u53d1\u4f7f\u7528\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u79d1\u5b66\u8ba1\u7b97\u5e93<\/strong>\uff1a\u5bf9\u4e8e\u79d1\u5b66\u8ba1\u7b97\u548c\u6570\u636e\u5206\u6790\uff0cNumPy\u3001Pandas\u3001Matplotlib\u7b49\u5e93\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/li>\n<li><strong>Web\u5f00\u53d1\u6846\u67b6<\/strong>\uff1a\u5982\u679c\u8fdb\u884cWeb\u5f00\u53d1\uff0c\u53ef\u4ee5\u8003\u8651\u5b89\u88c5Django\u6216Flask\u7b49\u6846\u67b6\u3002<\/li>\n<\/ul>\n<p><p>3\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7684\u9009\u62e9<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684IDE\u53ef\u4ee5\u63d0\u9ad8Python\u5f00\u53d1\u7684\u6548\u7387\u3002\u5e38\u7528\u7684Python IDE\u5305\u62ecPyCharm\u3001VSCode\u3001Jupyter Notebook\u7b49\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>PyCharm<\/strong>\uff1aPyCharm\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684Python IDE\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5f00\u53d1\u5de5\u5177\u548c\u63d2\u4ef6\u652f\u6301\u3002<\/li>\n<li><strong>VSCode<\/strong>\uff1aVSCode\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\u7684\u5f00\u53d1\uff0c\u5e76\u4e14\u901a\u8fc7\u63d2\u4ef6\u53ef\u4ee5\u589e\u5f3a\u5176\u5bf9Python\u7684\u652f\u6301\u3002<\/li>\n<li><strong>Jupyter Notebook<\/strong>\uff1aJupyter Notebook\u662f\u4e00\u79cd\u4ea4\u4e92\u5f0f\u7684\u5f00\u53d1\u73af\u5883\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u5206\u6790\u548c\u673a\u5668\u5b66\u4e60\u9879\u76ee\u3002<\/li>\n<\/ul>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u662f\u5b66\u4e60\u548c\u4f7f\u7528Python\u7684\u7b2c\u4e00\u6b65\uff0c\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u548c\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u5408\u9002\u7684\u5b89\u88c5\u65b9\u6cd5\u81f3\u5173\u91cd\u8981\u3002\u65e0\u8bba\u662f\u901a\u8fc7\u5b98\u65b9\u7f51\u7ad9\u76f4\u63a5\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u8fd8\u662f\u4f7f\u7528Anaconda\u8fd9\u6837\u7684\u6570\u636e\u79d1\u5b66\u5e73\u53f0\uff0c\u4ea6\u6216\u662f\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u5305\u7ba1\u7406\u5de5\u5177\u8fdb\u884c\u5b89\u88c5\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9047\u5230\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u3001\u7248\u672c\u51b2\u7a81\u3001\u4f9d\u8d56\u5e93\u5b89\u88c5\u7b49\u5e38\u89c1\u95ee\u9898\uff0c\u4f46\u901a\u8fc7\u5408\u7406\u7684\u914d\u7f6e\u548c\u4f18\u5316\uff0c\u8fd9\u4e9b\u95ee\u9898\u90fd\u53ef\u4ee5\u5f97\u5230\u89e3\u51b3\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u901a\u8fc7\u914d\u7f6epip\u3001\u5b89\u88c5\u5e38\u7528\u5e93\u4ee5\u53ca\u9009\u62e9\u5408\u9002\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8Python\u7684\u4f7f\u7528\u4f53\u9a8c\u548c\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b89\u88c5Python 2019\u7248\u672c\uff1f<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\uff0c\u9009\u62e92019\u5e74\u53d1\u5e03\u7684\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u6307\u5bfc\u60a8\u5b8c\u6210\u5b89\u88c5\u6b65\u9aa4\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u65b9\u4fbf\u4f7f\u7528\u3002\u5bf9\u4e8emacOS\u7528\u6237\uff0c\u540c\u6837\u53ef\u4ee5\u4ece\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u6216\u8005\u4f7f\u7528Homebrew\u547d\u4ee4\u6765\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u3002Linux\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u6bd4\u5982apt\u6216yum\uff0c\u6765\u5b89\u88c5\u6240\u9700\u7684Python\u7248\u672c\u3002<\/p>\n<p><strong>\u5b89\u88c5Python 2019\u7248\u672c\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4f9d\u8d56\u9879\uff1f<\/strong><br \/>\u5728\u5b89\u88c5Python\u4e4b\u524d\uff0c\u786e\u8ba4\u60a8\u7684\u7cfb\u7edf\u5df2\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\u3002\u4f8b\u5982\uff0c\u67d0\u4e9bLinux\u53d1\u884c\u7248\u53ef\u80fd\u9700\u8981\u5b89\u88c5\u5f00\u53d1\u5de5\u5177\u5305\uff08\u5982build-essential\uff09\u4ee5\u4fbf\u80fd\u591f\u987a\u5229\u7f16\u8bd1\u548c\u5b89\u88c5\u6240\u9700\u7684\u5e93\u3002\u6b64\u5916\uff0c\u5982\u679c\u60a8\u8ba1\u5212\u4f7f\u7528\u7279\u5b9a\u7684Python\u5e93\uff0c\u786e\u4fdd\u76f8\u5e94\u7684\u7cfb\u7edf\u5e93\u4e5f\u5df2\u5b89\u88c5\uff0c\u4ee5\u907f\u514d\u540e\u7eed\u4f7f\u7528\u65f6\u51fa\u73b0\u95ee\u9898\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u540c\u65f6\u5b89\u88c5\u591a\u4e2a\u7248\u672c\u7684Python\uff1f<\/strong><br \/>\u5b8c\u5168\u53ef\u4ee5\uff01\u60a8\u53ef\u4ee5\u5728\u540c\u4e00\u53f0\u8ba1\u7b97\u673a\u4e0a\u540c\u65f6\u5b89\u88c5\u591a\u4e2a\u7248\u672c\u7684Python\u3002\u4f7f\u7528Python\u865a\u62df\u73af\u5883\uff08\u5982venv\u6216virtualenv\uff09\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7ba1\u7406\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u548cPython\u7248\u672c\uff0c\u907f\u514d\u7248\u672c\u51b2\u7a81\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u6bcf\u4e2a\u7248\u672c\u7684\u5b89\u88c5\u8def\u5f84\u4e0d\u540c\uff0c\u5e76\u5728\u4f7f\u7528\u65f6\u660e\u786e\u6307\u5b9a\u6240\u9700\u7684\u7248\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e00\u3001\u56de\u7b54\u95ee\u9898 2019\u5e74\uff0cPython\u7684\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\uff0c\u4e3b\u8981\u5305\u62ec\uff1a\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3001 [&hellip;]","protected":false},"author":3,"featured_media":961853,"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\/961849"}],"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=961849"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/961849\/revisions"}],"predecessor-version":[{"id":961854,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/961849\/revisions\/961854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/961853"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=961849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=961849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=961849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}