{"id":1092,"date":"2021-11-27T03:13:25","date_gmt":"2021-11-26T19:13:25","guid":{"rendered":"https:\/\/byy3.com\/?p=1092"},"modified":"2021-11-27T03:20:39","modified_gmt":"2021-11-26T19:20:39","slug":"python%e8%a7%a3%e5%86%b3%e6%a0%bc%e5%bc%8f%e5%92%8c%e4%b9%b1%e7%a0%81%e5%85%bc%e5%ae%b9%e9%97%ae%e9%a2%98%ef%bc%8c%e8%bf%98%e6%98%afcolab%e7%9a%84jupyter-book%e6%96%b9%e4%be%bf","status":"publish","type":"post","link":"https:\/\/byy3.com\/?p=1092","title":{"rendered":"python\u89e3\u51b3\u683c\u5f0f\u548c\u4e71\u7801\u517c\u5bb9\u95ee\u9898\uff0c\u8fd8\u662fcolab\u7684jupyter book\u65b9\u4fbf"},"content":{"rendered":"<p>python3.8\u548c3.7\u7248\u672c\u4ee3\u6c9f\u5f88\u5927\uff0c\u5f88\u591a\u7248\u672c\u95ee\u9898\uff0c\u7279\u522b\u662fpython2\u548cpython3\u7684\u7248\u672c\u95ee\u9898\u53ef\u4ee5\u4f7f\u7528apt-get install 2to3 \u89e3\u51b3\uff0c\u4f7f\u7528\u65b9\u6cd52to3 -w caiji.py\u547d\u4ee4\u53ef\u4ee5\u81ea\u52a8\u5907\u4efd\u5df2\u7ecf\u5347\u7ea7\u7248\u672c\uff0c\u4f46\u662f\u5f88\u591a\u5e93\u95ee\u9898\u662f\u6ca1\u7248\u672c\u89e3\u51b3\u7684\uff0c\u6bd4\u5982python2\u7684\u65b0\u95fb\u89e3\u6790\u5e93newspaper \u5728python3\u7684\u5e93\u5c31\u662fnewspaper3k\u8fd8\u6709\u5c31\u662furllib\u548curllib2\u8fd8\u6709\u5c31\u662f\u5b89\u88c5\u8fd0\u884c\u7684\u7a0b\u5e8f\u73af\u5883\u4e00\u5b9a\u8981\u8bb0\u5f97\u5efa\u4e00\u4e2arequirements.txt\u628a\u9700\u8981\u7684\u5e93\u548c\u7248\u672c\u90fd\u5199\u8fdb\u53bb\uff0c\u6bd4\u5982<\/p>\n<p>lxml==4.6.4<br \/>\npython-wordpress-xmlrpc==2.3<br \/>\nnewspaper3k==0.2.8<\/p>\n<p>jieba3k==0.35.1<br \/>\nhttp.client==0.1.22<\/p>\n<p>httplib2==0.14.0<\/p>\n<p>urllib3==1.25.8<\/p>\n<p>requests==2.22.0<\/p>\n<p>\u4e0d\u77e5\u9053\u5f53\u524d\u7248\u672c\u53ef\u4ee5\u4f7f\u7528 pip3 list\u67e5\u770b\u5e93\u7684\u5177\u4f53\u7248\u672c\uff0c\u7248\u672c\u592a\u9ad8\u5c31\u5378\u8f7dpip3 uninstall lxml \u7136\u540e\u518d\u5b89\u88c5pip3 install lxml==4.6.4<\/p>\n<p>\u4e5f\u53ef\u4ee5\u5728https:\/\/pypi.org\/project\/lxml\/\u4e2d\u67e5\u770b\u7248\u672c\u53f7\u548c\u5e74\u4efd\u3002\u6839\u636e\u65f6\u95f4\u63a8\u65ad\u4e4b\u524d\u8fd0\u884c\u7684\u6b63\u5e38\u7684\u7248\u672c\u65f6\u95f4\u548c\u5bf9\u5e94\u7684\u7248\u672c\u53f7\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5173\u4e8echinanews.com\u5df2\u7ecf\u5f00\u59cb\u5efa\u7acb\u4e86\u53cd\u722c\u673a\u5236\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528pip install fake-useragent\u6216\u8005<\/p>\n<pre><code>pip install requests-random-user-agent<\/code>\u81ea\u52a8\u8c03\u7528<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>python3.8\u548c3.7\u7248\u672c\u4ee3\u6c9f\u5f88\u5927\uff0c\u5f88\u591a\u7248\u672c\u95ee\u9898\uff0c\u7279\u522b\u662fpython2\u548cpython3\u7684\u7248\u672c\u95ee\u9898\u53ef\u4ee5\u4f7f\u7528a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[672,674,673,370],"class_list":["post-1092","post","type-post","status-publish","format-standard","hentry","category-net-security","tag-python"],"_links":{"self":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/1092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1092"}],"version-history":[{"count":0,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/1092\/revisions"}],"wp:attachment":[{"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}