{"id":854,"date":"2021-12-28T03:11:00","date_gmt":"2021-12-28T03:11:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=854"},"modified":"2021-12-28T03:11:00","modified_gmt":"2021-12-28T03:11:00","slug":"854","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/12\/28\/854\/","title":{"rendered":"\u9999\u6a59\u6d3e Orange Pi Zero \u6eda\u52a8\u5347\u7ea7\u628aPython3\u7684\u5305\u7ba1\u7406\u5668pip3\u635f\u5bb3\u4fee\u590d"},"content":{"rendered":"<h3>\u4ec0\u4e48\u662f pip \uff1fpip \u662f Python \u4e2d\u7684\u6807\u51c6\u5e93\u7ba1\u7406\u5668\u3002\u5b83\u5141\u8bb8\u4f60\u5b89\u88c5\u548c\u7ba1\u7406\u4e0d\u5c5e\u4e8e Python\u6807\u51c6\u5e93 \u7684\u5176\u5b83\u8f6f\u4ef6\u5305\u3002<\/h3>\n<h3>pip \u662f Python \u7684\u5305\u7ba1\u7406\u5668\u3002\u8fd9\u610f\u5473\u7740\u5b83\u662f\u4e00\u4e2a\u5de5\u5177\uff0c\u5141\u8bb8\u4f60\u5b89\u88c5\u548c\u7ba1\u7406\u4e0d\u5c5e\u4e8e\u6807\u51c6\u5e93\u7684\u5176\u4ed6\u5e93\u548c\u4f9d\u8d56\u3002<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/1727753203.png\" alt=\"pip3.png\" title=\"pip3.png\"><\/p>\n<h2>Python \u73af\u5883\u5b89\u88c5 \u548c pip \u5305\u7ba1\u7406\u5668\u5b89\u88c5<\/h2>\n<h3>\u5927\u90e8\u5206Linux\u7cfb\u7edf\u6211\u4eec\u53ea\u9700\u8981\u5355\u72ec\u5b89\u88c5 pip \u5373\u53ef<\/h3>\n<pre><code>apt update\napt install python3 python3-pip -y<\/code><\/pre>\n<h3>requests\u5e93\u7684\u5b89\u88c5 \u548c <a href=\"https:\/\/cloud.tencent.com\/developer\/labs\/lab\/10388\">Python\u722c\u866b1-Requests\u5e93\u5165\u95e8\u4e0e\u5b9e\u6218<\/a><\/h3>\n<ul>\n<li>\n<p>\u6211\u4eec\u4f7f\u7528 pip \u8f6f\u4ef6\u7ba1\u7406\u5de5\u5177\u5b89\u88c5 requests \uff0c\u5982\u679c\u4f60\u9700\u8981\u5176\u4ed6\u65b9\u6cd5\u8bf7\u8bbf\u95ee\u5b98\u65b9\u7f51\u7ad9\u6307\u5bfc\u9875\u9762\u3002<\/p>\n<pre><code>pip3 install requests<\/code><\/pre>\n<h2>\u6211\u4f7f\u7528\u9999\u6a59\u6d3e\u5b89\u88c5armbian\uff0c\u7528\u6765\u5b66\u4e60python\u548cpt\u4e0b\u8f7d\u6302\u8f7d\u4e00\u4e9b\u7535\u5b50\u4e66<\/h2>\n<h3>\u9999\u6a59\u6d3e <a href=\"http:\/\/www.orangepi.cn\/orangepizero\/index_cn.html\">Orange Pi Zero<\/a> \u662f\u4e3a\u8c01\u8bbe\u8ba1\u7684\uff1f<\/h3>\n<p>Orange Pi Zero \u4e0d\u4ec5\u4ec5\u662f\u4e00\u6b3e\u6d88\u8d39\u54c1\uff0c\u540c\u65f6\u4e5f\u662f\u7ed9\u4efb\u4f55\u60f3\u7528\u6280\u672f\u6765\u8fdb\u884c\u521b\u4f5c\u521b\u65b0\u7684\u4eba\u8bbe\u8ba1\u7684\u3002\u5b83\u662f\u4e00\u6b3e\u975e\u5e38\u7b80\u5355\u3001\u6709\u8da3\u3001\u5b9e\u7528\u7684\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u7528\u5b83\u53bb\u6253\u9020\u4f60\u8eab\u8fb9\u7684\u4e16\u754c\u3002 <br \/><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/1600476226.webp\" alt=\"arm.webp\" title=\"arm.webp\"><\/p>\n<\/li>\n<\/ul>\n<h3>\u4f7f\u7528\u9999\u6a59\u6d3e\u5c31\u662f\u4e3a\u4e86\u7701\u7535\uff0cUSB\u7ebf\u8fde\u8def\u7531\u5668\u7684USB\u63a5\u53e3\u5c31\u53ef\u4ee5\u591f\u7528\uff0c\u7a33\u5b9a\u8dd1\u4e861\u5e74\u591a\uff0c\u524d\u51e0\u5929 apt upgrade \u6eda\u52a8\u5347\u7ea7\u4e86\u8f6f\u4ef6\u3002<\/h3>\n<p>\u628a python3 \u5347\u7ea7\u5230 Python 3.9.9\uff0c\u7ed3\u679cpip\u5305\u7ba1\u7406\u548c\u7b2c\u4e09\u65b9\u5305\u90fd\u6ca1\u6cd5\u7528\u4e86\uff0c\u4f7f\u7528 apt \u91cd\u65b0\u5b89\u88c5\u4e5f\u5931\u8d25<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/2108869691.png\" alt=\"get-pip.png\" title=\"get-pip.png\"><\/p>\n<h3>\u7f51\u4e0a\u67e5\u4e86\u4e00\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>get-pip.py<\/code> \u811a\u672c\u5b89\u88c5\uff0c<a href=\"https:\/\/bootstrap.pypa.io\/get-pip.py\">\u5b98\u65b9\u4e0b\u8f7d<\/a><\/h3>\n<pre><code>pip3\n\nTraceback (most recent call last):\n  File \"\/usr\/local\/bin\/pip3\", line 6, in &lt;module&gt;\n    from pip._internal.cli.main import main\nModuleNotFoundError: No module named 'pip._internal.cli.main'\n\nwget https:\/\/bootstrap.pypa.io\/get-pip.py\n\npython3  get-pip.py<\/code><\/pre>\n<h3>\u987a\u5229\u5b89\u88c5\u597d <code>pip<\/code> \u8f6f\u4ef6\uff0c\u53d1\u73b0mysql\u5e93\u4e5f\u5931\u6548\u4e86\uff0c\u4f7f\u7528pip\u5b89\u88c5\uff0c\u811a\u672c\u987a\u5229\u8fd0\u884c<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/2534928426.png\" alt=\"mysql-connector.png\" title=\"mysql-connector.png\"><\/p>\n<pre><code>python3 mykcp.py\n\nTraceback (most recent call last):\n  File \"\/root\/mykcp.py\", line 1, in &lt;module&gt;\n    import sys, os, mysql.connector\nModuleNotFoundError: No module named 'mysql'\n\npip3 install mysql-connector<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662f pip \uff1fpip \u662f Python \u4e2d\u7684\u6807\u51c6\u5e93\u7ba1\u7406\u5668\u3002\u5b83\u5141\u8bb8\u4f60\u5b89\u88c5\u548c\u7ba1\u7406\u4e0d\u5c5e\u4e8e Python [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,12],"tags":[45],"class_list":["post-854","post","type-post","status-publish","format-standard","hentry","category-linux","category-learn","tag-python"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=854"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/854\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}