{"id":1983,"date":"2024-09-07T16:28:22","date_gmt":"2024-09-07T08:28:22","guid":{"rendered":"http:\/\/blog.xtaa.cn\/?p=1983"},"modified":"2024-09-28T14:36:12","modified_gmt":"2024-09-28T06:36:12","slug":"%e4%bd%bf%e7%94%a8pycharmconda%e9%85%8d%e7%bd%ae%e8%99%9a%e6%8b%9f%e7%8e%af%e5%a2%83%e8%af%a6%e7%bb%86%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"http:\/\/blog.xtaa.cn\/index.php\/2024\/09\/07\/%e4%bd%bf%e7%94%a8pycharmconda%e9%85%8d%e7%bd%ae%e8%99%9a%e6%8b%9f%e7%8e%af%e5%a2%83%e8%af%a6%e7%bb%86%e6%ad%a5%e9%aa%a4\/","title":{"rendered":"\u4f7f\u7528pycharm+conda\u914d\u7f6e\u865a\u62df\u73af\u5883\u8be6\u7ec6\u6b65\u9aa4"},"content":{"rendered":"\n<p>\u6700\u8fd1\u7528pycharm\u4f7f\u7528seleniumwire\uff0c\u4f46\u5728python3.12\u7248\u672c\u51fa\u9519\uff0c\u6240\u4ee5\u8981\u75283.9\u7248\u672c\uff0c\u6240\u4ee5\u5c31\u7528\u5230anaconda\u6765\u7ba1\u7406\u7248\u672c\uff0c\u63a8\u8350\u7b2c\u4e00\u79cd\u4f7f\u7528\u5df2\u6709\u7684conda\u73af\u5883\uff0c\u53ef\u4ee5\u6bd4\u8f83\u65b9\u4fbf\u7684\u7ba1\u7406\u7248\u672c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00.pycharm\u4f7f\u7528\u5df2\u6709\u7684conda\u73af\u5883<\/h2>\n\n\n\n<p>\u76f8\u8f83\u4e8e\u4f7f\u7528pycharm\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u5176\u5b9e\u4f7f\u7528conda\u521b\u5efa\u66f4\u4e3a\u7b80\u5355\uff0c\u5728\u521b\u5efa\u540e\u53ea\u9700\u8981\u5728pycharm\u4e2d\u6dfb\u52a0\u8be5\u865a\u62df\u73af\u5883\u5373\u53ef\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u521b\u5efa\u865a\u62df\u73af\u5883<\/h3>\n\n\n\n<p>\u9996\u5148\uff0c\u6253\u5f00conda prompt\uff0c\u5e76\u521b\u5efa\u65b0\u7684\u865a\u62df\u73af\u5883\uff0c\u8bbe\u7f6e\u73af\u5883\u540d\u79f0\u4ee5\u53ca\u76f8\u5e94python\u7248\u672c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>conda create -n env_name python=3.6.0<\/code><\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7conda\u547d\u4ee4\u67e5\u770b\u5e76\u6fc0\u6d3b\u73af\u5883\uff0c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>conda activate tf1.15<\/code><\/code><\/pre>\n\n\n\n<p>\u6fc0\u6d3b\u8fdb\u5165\u73af\u5883\u540e\u6dfb\u52a0\u5305\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>conda install pandas<\/code>\n\u5982\u679cconda\u5b89\u88c5\u4e0d\u6210\u529f\u53ef\u8bd5\u4e0bpip install selenium-wire<\/code><\/pre>\n\n\n\n<p>2\u3001\u5982\u679c\u662fpycharm\u65b0\u5efa\u9879\u76ee\u4f7f\u7528\u521a\u5efa\u7684\u865a\u62df\u73af\u5883<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u7b2c\u4e00\u884c\u7684\u4f4d\u7f6e\u4e00\u680f\u586b\u5199\u7d22\u8981\u521b\u5efa\u9879\u76ee\u7684\u76ee\u6807\u6587\u4ef6\u5939\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>\u89e3\u91ca\u5668\u7c7b\u578b\u9009custom environment<\/li>\n\n\n\n<li>\u73af\u5883\u9009\u62e9\u5df2\u5b58\u5728\u7684<\/li>\n\n\n\n<li>\u7c7b\u578b\u9009\u62e9conda<\/li>\n\n\n\n<li>\u518d\u9009\u62e9\u521a\u521a\u81ea\u5df1\u521b\u5efa\u7684\u865a\u62df\u73af\u5883<\/li>\n<\/ol>\n\n\n\n<p>\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u5728pycharm\u4e2d\u5df2\u6709\u9879\u76ee\u4f7f\u7528\u865a\u62df\u73af\u5883<\/h3>\n\n\n\n<p>\u4f9d\u6b21\u6253\u5f00<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6587\u4ef6<\/li>\n\n\n\n<li>\u8bbe\u7f6e<\/li>\n\n\n\n<li>python\u89e3\u91ca\u5668<\/li>\n\n\n\n<li>\u56fe\u6807<\/li>\n\n\n\n<li>\u5168\u90e8\u663e\u793a<\/li>\n\n\n\n<li>\u52a0\u53f7<\/li>\n\n\n\n<li>conda\u73af\u5883<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431578.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u70b9\u51fb\u73b0\u6709\u73af\u5883\uff0c\u5728\u89e3\u91ca\u5668\u4e2d\u9009\u62e9anaconda\u6587\u4ef6\u5939\u4e0b\u7684envs\u6587\u4ef6\u5939\u4e0b\u7684\u521a\u5efa\u597d\u7684\u865a\u62df\u73af\u5883\u4e2d\u7684python.exe\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u7136\u540econda\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u9009\u62e9anaconda\u6587\u4ef6\u5939\u4e0b\u7684&#8221;Scripts&#8221;\u6587\u4ef6\u5939\u4e0b\u7684conda.exe\uff0c\u70b9\u51fb\u786e\u8ba4\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431579.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u6b64\u65f6\u5c31\u4f1a\u591a\u51fa\u9009\u5b9a\u7684\u89e3\u91ca\u5668\uff0c\u53ef\u5728\u8f6f\u4ef6\u5305\u4e2d\u67e5\u770b\u5f53\u524d\u73af\u5883\u4e2d\u7684\u8d44\u6e90\u5305\uff0c\u5e76\u70b9\u51fb\u5e94\u7528\uff0c\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u5373\u53ef\u5b8c\u6210\u914d\u7f6e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431580.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431581.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u4ece\u754c\u9762\u53f3\u4e0b\u89d2\u770b\u5230\u5df2\u7ecf\u4f7f\u7528\u4e86\u521a\u521a\u521b\u5efa\u7684\u865a\u62df\u73af\u5883\u4e0b\u7684\u89e3\u91ca\u5668\uff0c\u6b64\u65f6\u53ef\u4ee5\u8fd0\u884c\u4e00\u4e0bmain\u51fd\u6570\u6d4b\u8bd5\u662f\u5426\u914d\u7f6e\u5b8c\u6210\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431582.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u8f93\u51fa\u6b63\u5e38\uff0c\u5219\u914d\u7f6e\u5b8c\u6210\u3002<\/p>\n\n\n\n<p>\u8fd8\u53ef\u4ee5\u53c2\u8003<a href=\"https:\/\/blog.csdn.net\/qq_40968179\/article\/details\/128990022\">https:\/\/blog.csdn.net\/qq_40968179\/article\/details\/128990022<\/a>\u628a\u65e7\u7535\u8111\u7684\u865a\u62df\u73af\u5883\u76f4\u63a5\u8fc1\u79fb\u5230\u65b0\u7535\u8111\u4e0a\u7528\u3002<\/p>\n\n\n\n<p>(selenium-wire\u51fa\u9519\u63d0\u793aoptmanager\u91cc #import blinker._saferef)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c.\u4f7f\u7528pycharm\u521b\u5efa\u865a\u62df\u73af\u5883<\/h2>\n\n\n\n<p>\u9996\u5148\uff0c\u6253\u5f00\u70b9\u51fbpycharm\u5de6\u4e0a\u65b9\u7684\u201c\u6587\u4ef6\u201d\u4e2d\u7684\u201c\u65b0\u5efa\u9879\u76ee\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431570.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u65b0\u5efa\u9879\u76ee\u9009\u9879\u586b\u5199<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u7b2c\u4e00\u884c\u7684\u4f4d\u7f6e\u4e00\u680f\u586b\u5199\u7d22\u8981\u521b\u5efa\u9879\u76ee\u7684\u76ee\u6807\u6587\u4ef6\u5939\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u6b64\u5de5\u5177\u65b0\u5efa\u73af\u5883\u5904\u9009\u62e9&#8221;Conda\u201d<\/li>\n\n\n\n<li>\u7b2c\u4e8c\u4e2a\u4f4d\u7f6e\u662f\u6307\u5b58\u50a8\u65b0\u5efa\u7684\u865a\u62df\u73af\u5883\u4e2d\u7684\u8d44\u6e90\u5305\u7684\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>python\u526f\u672c\u6839\u636e\u9879\u76ee\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002<\/li>\n\n\n\n<li>conda\u53ef\u6267\u884c\u6587\u4ef6\u662f\u5728\u81ea\u5df1\u7684anaconda\u6587\u4ef6\u5939\u4e0b\u7684&#8221;Scripts&#8221;\u6587\u4ef6\u5939\u4e0b\u7684conda.exe\u3002<\/li>\n\n\n\n<li>\u53ef\u6839\u636e\u81ea\u8eab\u9700\u6c42\u9009\u62e9\u662f\u5426\u9009\u62e9\u7528\u4e8e\u6240\u6709\u9879\u76ee\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u5728\u521b\u5efa\u4e4b\u540e\u53ef\u80fd\u4f1a\u51fa\u73b0\u62a5\u9519\uff0c\u65e0\u89c6\u5373\u53ef\uff0c\u76f4\u63a5\u8fdb\u5165\u4e0b\u4e00\u6b65\u64cd\u4f5c\u3002<br>\u6587\u4ef6\u4e2d\u627e\u5230\u8bbe\u7f6e\uff0c\u5728\u8bbe\u7f6e\u4e2d\u627e\u5230\u5e76\u70b9\u51fbpython\u89e3\u91ca\u5668\uff0c\u70b9\u51fb\u56fe\u4e2d\u7684\u56fe\u6807\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431571.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u70b9\u51fb\u540e\u9009\u62e9\u201c\u5c55\u793a\u5168\u90e8\u201d,\u5728python\u89e3\u91ca\u5668\u9009\u62e9\u754c\u9762\u70b9\u51fb\u4e0b\u56fe\u4e2d\u52a0\u53f7\uff0c\u5e76\u8fdb\u5165\u6dfb\u52a0python\u89e3\u91ca\u5668\u754c\u9762\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431572.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u70b9\u51fb\u201c\u65b0\u73af\u5883\u201d\uff0c\u5728conda\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u9009\u62e9\u81ea\u5df1\u7684anaconda\u6587\u4ef6\u5939\u4e0bScripts\u6587\u4ef6\u4e0b\u7684conda.exe\u6587\u4ef6\uff0c\u5e76\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431573.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u4e4b\u540e\u8f6f\u4ef6\u4f1a\u81ea\u52a8\u5b89\u88c5\u76f8\u5e94\u89e3\u91ca\u5668\uff0c\u865a\u62df\u73af\u5883\u521b\u5efa\u6210\u529f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431574.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u5b89\u88c5\u6240\u9700\u8d44\u6e90\u5305<\/h3>\n\n\n\n<p>\u6211\u4e2a\u4eba\u6bd4\u8f83\u4e60\u60ef\u5728conda prompt \u4e2d\u8fdb\u884c\u8d44\u6e90\u5305\u7684\u5b89\u88c5\uff08\u5728\u5b89\u88c5\u524d\u4e00\u5b9a\u8981\u786e\u8ba4\u6240\u5b89\u88c5\u8d44\u6e90\u5305\u4e0epython\u89e3\u91ca\u5668\u7248\u672c\u662f\u5426\u5bf9\u5e94\uff0c\u4e0d\u7136\u540e\u7eed\u4f1a\u5f88\u9ebb\u70e6\uff09\u3002<\/p>\n\n\n\n<p>\u6253\u5f00\u684c\u9762\u83dc\u5355\uff0c\u70b9\u51fbanaconda\u4e2d\u7684conda prompt\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528conda\u6307\u4ee4\u67e5\u770b\u76ee\u524d\u6240\u62e5\u6709\u7684\u7684conda\u73af\u5883\uff08\u5bf9\u5e94anaconda\u6587\u4ef6\u5939\u4e0b\u7684env\u6587\u4ef6\u5939\uff09<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>1<\/td><td><code>conda <\/code><code>env<\/code><code>list&nbsp;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431575.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u6fc0\u6d3b\u4f60\u6240\u521b\u5efa\u7684\u865a\u62df\u73af\u5883<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>1<\/td><td><code>conda activate tf1.15<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6b64\u65f6\u4fbf\u8fdb\u5165\u5230\u4e86\u76f8\u5e94\u7684\u865a\u62df\u73af\u5883\u4e2d\uff0c\u4f1a\u5728\u4e0b\u56fe\u4f4d\u7f6e\u6709\u6240\u63d0\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u6b64\u65f6\u4fbf\u53ef\u4ee5\u901a\u8fc7conda\u547d\u4ee4\u6dfb\u52a0\u76f8\u5e94\u6240\u9700\u8981\u7684\u8d44\u6e90\u5305\uff0c\u6bd4\u5982pandas\uff0c\u4f8b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>1<\/td><td><code>conda <\/code><code>install<\/code><code>pandas<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u73af\u5883\u4e2d\u7684\u8d44\u6e90\u5305\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>1<\/td><td><code>conda list<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img.jbzj.com\/file_images\/article\/202405\/202452495431577.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u6b64\u65f6\u5219\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\uff0c\u8bf8\u5982\u6b64\u7c7b\u53ef\u4ee5\u5b89\u88c5\u5176\u4ed6\u7684\u8d44\u6e90\u5305\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u53ef\u80fd\u5b58\u5728\u7684\u95ee\u9898\u53ca\u5e94\u5bf9<\/h3>\n\n\n\n<p>\u82e5\u4f60\u7684pycharm\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u65e0\u6cd5\u521b\u5efapython\u89e3\u91ca\u5668\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7conda prompt\u8fdb\u884c\u521b\u5efa\uff0c\u5e76\u5728pycharm\u4e2d\u5f15\u7528\u6b64\u73af\u5883\uff0c\u6b64\u5904\u53ef\u53c2\u8003\u540e\u7eed\u90e8\u5206\u4e8c\u7684\u5185\u5bb9\uff0c<\/p>\n\n\n\n<p><a href=\"https:\/\/www.jb51.net\/python\/321628pdg.htm\">\u539f\u6587<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u7528pycharm\u4f7f\u7528seleniumwire\uff0c\u4f46\u5728python3.12\u7248\u672c\u51fa\u9519\uff0c\u6240\u4ee5\u8981\u75283.9\u7248\u672c\uff0c\u6240\u4ee5\u5c31 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1983","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1983"}],"version-history":[{"count":6,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1983\/revisions"}],"predecessor-version":[{"id":1996,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1983\/revisions\/1996"}],"wp:attachment":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1983"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}