{"id":706,"date":"2022-01-06T19:20:12","date_gmt":"2022-01-06T11:20:12","guid":{"rendered":"http:\/\/www.henrycome.com\/wordpress\/?p=706"},"modified":"2022-01-15T16:40:38","modified_gmt":"2022-01-15T08:40:38","slug":"20220106192013","status":"publish","type":"post","link":"http:\/\/www.henrycome.com\/wordpress\/202201061920\/706","title":{"rendered":"\u3010Python\u7b14\u8bb0\u3011-\u5b89\u88c5python\u5305\u548c\u8fd0\u884cpython"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">0\u3001\u67e5\u770bpython\u7684\u7248\u672c<\/h2>\n\n\n\n<p>UOS\u7cfb\u7edf\u672c\u8eab\u81ea\u5e26python\uff0c\u65e0\u9700\u53e6\u5916\u5b89\u88c5\u3002\u5728\u7ec8\u7aef\u76f4\u63a5\u8fd0\u884cpython -V\u548cPython3 -V\u53ef\u4ee5\u67e5\u770b\u7248\u672c,\u6ce8\u610fV\u662f\u5927\u5199\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u662fwindows\u7cfb\u7edf\uff0c\u53ef\u4ee5\u53c2\u8003\u83dc\u9e1f\u6559\u7a0b\u7684\u6559\u7a0b \u300a<a href=\"https:\/\/www.runoob.com\/python\/python-install.html\">Python\u73af\u5883\u642d\u5efa<\/a>\u300b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>henryuos@henryuos:~$ python -V\nPython 2.7.16\nhenryuos@henryuos:~$ python3 -V\nPython 3.7.3<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading\">\u4e00\u3001pip\u548cpip3\u7684\u533a\u522b<\/h2>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>pip \u662f Python \u5305\u7ba1\u7406\u5de5\u5177\uff0c\u8be5\u5de5\u5177\u63d0\u4f9b\u4e86\u5bf9Python \u5305\u7684\u67e5\u627e\u3001\u4e0b\u8f7d\u3001\u5b89\u88c5\u3001\u5378\u8f7d\u7684\u529f\u80fd\u3002\u76ee\u524d\u5982\u679c\u4f60\u5728 python.org \u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684\u5b89\u88c5\u5305\uff0c\u5219\u662f\u5df2\u7ecf\u81ea\u5e26\u4e86\u8be5\u5de5\u5177\u3002\u3010\u5f15\u7528\u81ea\u975e\u5e38\u597d\u7684\u81ea\u5b66\u7f51\u7ad9-\u83dc\u9e1f\u6559\u7a0b\u300a<a href=\"https:\/\/www.runoob.com\/w3cnote\/python-pip-install-usage.html\">Python pip \u5b89\u88c5\u4e0e\u4f7f\u7528<\/a>\u300b\u3011<\/p>\n<\/div><\/div>\n\n\n\n<p>\u8fd9\u4e2a\u662fpython2\u548cpython3\u7684\u5305\u5b89\u88c5\u7ba1\u7406\u5de5\u5177\uff0c\u533a\u522b\u53c2\u8003\uff1a\u300a<a href=\"https:\/\/blog.csdn.net\/lvsehaiyang1993\/article\/details\/80596513\" data-type=\"URL\" data-id=\"https:\/\/blog.csdn.net\/lvsehaiyang1993\/article\/details\/80596513\">Python\uff1apip \u548cpip3\u7684\u533a\u522b<\/a>\u300b<\/p>\n\n\n\n<p>Henry\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1a\u5206\u522b\u5b89\u88c5\u5230\u4e0d\u540c\u7684\u76ee\u5f55\uff0c\u5982\u679c\u53ea\u5b89\u88c5\u4e86\u4e00\u4e2apython\u7248\u672c\uff0c\u5c31\u4e00\u6837\u3002\u3010\u53ef\u80fd\u6709\u8bef2022.1.6,\u6b22\u8fce\u6267\u6307\u6b63\u3011<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u5b89\u88c5python\u5305<\/h2>\n\n\n\n<p>\u7cfb\u7edf\u662fUOS\uff08\u5bb6\u5ead\u724821.1.1\uff09\uff0c\u5185\u7f6e\u5b89\u88c5\u4e86python2\u548cpython3<\/p>\n\n\n\n<p>\u5728pycharm\u91cc\u5b89\u88c5python\u5305\uff0c\u5728terminal\u91cc\u8f93\u5165\u4ee3\u7801\uff08terminal\u6982\u5ff5\u53c2\u8003\u300a<a href=\"https:\/\/www.jianshu.com\/p\/a74188ba2b31\" data-type=\"URL\" data-id=\"https:\/\/www.jianshu.com\/p\/a74188ba2b31\">\u547d\u4ee4\u884c\u76f8\u5173\u6982\u5ff5\u68b3\u7406(CLI\u3001Terminal\u3001Shell\u3001\u811a\u672c)\u300b\uff09<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u56e0\u4e3a\u6211\u5df2\u7ecf\u5b89\u88c5\u4e86\uff0c\u8fd9\u91cc\u63d0\u793a\u4ee5\u53ca\u5b58\u5728\n\npip install pygame\nRequirement already satisfied: pygame in .\/venv\/lib\/python3.7\/site-packages (2.1.2)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u5217\u51fa\u4ee5\u53ca\u5b89\u88c5\u7684python\u5305\npip list\nPackage    Version\n---------- -------\npip        21.3.1\npygame     2.1.2\nsetuptools 59.4.0\n\n\/\/pip3\u7684list\u548cpip\u662f\u4e00\u6837\u7684\uff1a\npip3 list\nPackage    Version\n---------- -------\npip        21.3.1\npygame     2.1.2\nsetuptools 59.4.0<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u67e5\u770b\u5df2\u7ecf\u5b89\u88c5\u7684\u5305\u7684\u4fe1\u606f\npip show pygame\nName: pygame\nVersion: 2.1.2\nSummary: Python Game Development\nHome-page: https:\/\/www.pygame.org\nAuthor: A community project.\nAuthor-email: pygame@pygame.org\nLicense: LGPL\nLocation: \/home\/henryuos\/PycharmProjects\/pythonProject\/venv\/lib\/python3.7\/site-packages\nRequires:\nRequired-by:<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001python\u5f00\u53d1\u684c\u9762\u7a0b\u5e8f\u7684tkinter\u5305<\/h2>\n\n\n\n<p>\u5b89\u88c5tkinter\uff0c\u8fd9\u4e2a\u9700\u8981\u5728\u7cfb\u7edf\u7ec8\u7aef\u5b89\u88c5\u6210\u529f\u3002\u6839\u636eIDE\u4f7f\u7528\u7684python\u7248\u672c\u6765\u5b89\u88c5\u5bf9\u5e94\u7684tinker\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u94fe\u63a5\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/weixin_39631755\/article\/details\/110698068\">\u300a\u5b89\u88c5tkinter\u6a21\u5757_\u8be6\u89e3python tkinter\u6a21\u5757\u5b89\u88c5\u8fc7\u7a0b<\/a>\u300b<\/p>\n\n\n\n<p>\u300a<a href=\"https:\/\/blog.csdn.net\/qq_22339457\/article\/details\/52490495\">Python\u4e2d\u5b89\u88c5Tkinter\u6a21\u5757<\/a>\u300b<\/p>\n\n\n\n<p>\u4e00\u4e2aPython GUI\u4ee3\u7801\uff1a\u53c2\u8003\u7f51\u53cb\u5199\u7684\u300a<a href=\"https:\/\/www.cnblogs.com\/guozhengxin\/p\/7152794.html\">GUI\u684c\u9762\u9879\u76ee&nbsp;<\/a>\u300b\uff0c\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u5c1d\u8bd5\u4e00\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u7cfb\u7edf\u7ea7\u522b\u67e5\u627e\u5b89\u88c5\u5305\uff0c\u7528search\u547d\u4ee4\nsudo apt search python3-tk\n\n\/\/ide\u4e2d\u4f7f\u7528python2\u7684\u7528\u8fd9\u4e2a\u547d\u4ee4\uff0c\u6211\u5b89\u88c5\u4e4b\u540e\uff0c\u5728ide\u4e2d\u4ecd\u7136\u63d0\u793a\u65e0\u6cd5\u5bfc\u5165tkinter\uff0c\u7136\u540e\u7528\u4e86\u4e0b\u9762\u7684\u547d\u4ee4\nsudo apt-get install python-tk\n\n\/\/ide\u4e2d\u4f7f\u7528python3\u7684\u7528\u8fd9\u4e2a\u547d\u4ee4\uff0c\u4e0d\u7136\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u4e5f\u5f15\u7528\u4e0d\u5230\nsudo apt-get install python3-tk\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt search python3-tk\n\u8bf7\u8f93\u5165\u5bc6\u7801:\n\u9a8c\u8bc1\u6210\u529f\n\u6b63\u5728\u6392\u5e8f... \u5b8c\u6210\n\u5168\u6587\u641c\u7d22... \u5b8c\u6210  \npython3-tk\/\u672a\u77e5 3.7.3-1 amd64\n  Tkinter - Writing Tk applications with Python 3.x\n\npython3-tk-dbg\/\u672a\u77e5 3.7.3-1 amd64\n  Tkinter - Writing Tk applications with Python 3.x (debug extension)\n\npython3-tksnack\/\u672a\u77e5,\u672a\u77e5 2.2.10.20090623-dfsg-8 all\n  Sound extension to Tcl\/Tk and Python\/Tkinter - Python 3.x library\n\npython3-tktreectrl\/\u672a\u77e5,\u672a\u77e5 2.0.2-1 all\n  Tkinter-based wrapper for Tk TreeCtrl for Python 3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install python3-tk\n\u6b63\u5728\u8bfb\u53d6\u8f6f\u4ef6\u5305\u5217\u8868... \u5b8c\u6210\n\u6b63\u5728\u5206\u6790\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb\u6811       \n\u6b63\u5728\u8bfb\u53d6\u72b6\u6001\u4fe1\u606f... \u5b8c\u6210       \n\u4e0b\u5217\u8f6f\u4ef6\u5305\u662f\u81ea\u52a8\u5b89\u88c5\u7684\u5e76\u4e14\u73b0\u5728\u4e0d\u9700\u8981\u4e86\uff1a\n ==========\u7701\u7565\u5f88\u591a==========\n  qtermwidget5-data squashfs-tools totem totem-common totem-plugins vlc-bin xinit\n=============\u7701\u7565\u5f88\u591a=========\n\u4f7f\u7528'sudo apt autoremove'\u6765\u5378\u8f7d\u5b83(\u5b83\u4eec)\u3002\n\u5efa\u8bae\u5b89\u88c5\uff1a\n  tix python3-tk-dbg\n\u4e0b\u5217\u3010\u65b0\u3011\u8f6f\u4ef6\u5305\u5c06\u88ab\u5b89\u88c5\uff1a\n  python3-tk\n\u5347\u7ea7\u4e86 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u65b0\u5b89\u88c5\u4e86 1 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u8981\u5378\u8f7d 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u6709 9 \u4e2a\u8f6f\u4ef6\u5305\u672a\u88ab\u5347\u7ea7\u3002\n\u9700\u8981\u4e0b\u8f7d 97.4 kB \u7684\u5f52\u6863\u3002\n\u89e3\u538b\u7f29\u540e\u4f1a\u6d88\u8017 462 kB \u7684\u989d\u5916\u7a7a\u95f4\u3002\n\u83b7\u53d6:1 https:\/\/home-packages.chinauos.com\/home plum\/main amd64 python3-tk amd64 3.7.3-1 &#91;97.4 kB]\n\u5df2\u4e0b\u8f7d 97.4 kB\uff0c\u8017\u65f6 1\u79d2 (179 kB\/s) \n\u6b63\u5728\u9009\u4e2d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 python3-tk:amd64\u3002\n(\u6b63\u5728\u8bfb\u53d6\u6570\u636e\u5e93 ... \u7cfb\u7edf\u5f53\u524d\u5171\u5b89\u88c5\u6709 267886 \u4e2a\u6587\u4ef6\u548c\u76ee\u5f55\u3002)\n\u51c6\u5907\u89e3\u538b ...\/python3-tk_3.7.3-1_amd64.deb  ...\n\u6b63\u5728\u89e3\u538b python3-tk:amd64 (3.7.3-1) ...\n\u6b63\u5728\u8bbe\u7f6e python3-tk:amd64 (3.7.3-1) ...<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading\">\u56db\u3001\u8fd0\u884cpython\u7684\u65b9\u5f0f<\/h2>\n\n\n\n<p>\u8fd9\u90e8\u5206\u5185\u5bb9\u6211\u5728\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u524d\u4e24\u4e2a\u65b9\u5f0f\uff08\u7ec8\u7aef\u547d\u4ee4\u884c\u548c\u7ec8\u7aef\u8fdb\u5165python\u4ea4\u4e92\u6a21\u5f0f\uff09\uff0c\u6709\u4e00\u4e9b\u4e0d\u597d\u61c2\u7684\u77e5\u8bc6\u3002\u5148\u4e0d\u53bb\u6df1\u7a76\u8fd9\u4e24\u4e2a\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5b66\u4e60\u7684\u65f6\u5019\u4e3b\u8981\u5728IDE\u4e2d\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0cIDE\uff0cIntegrated Development Environment\uff09\u3002IDE\u4e0d\u4ec5\u4ec5\u662f\u7f16\u8f91\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u6709\u4e2apy\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(\"\u4f7f\u7528print()\u8f93\u51fa\u4e00\u53e5\u8bdd\")<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7ec8\u7aef\u547d\u4ee4\u884c<\/h3>\n\n\n\n<p>\u4e0b\u9762\u662fuos\u4e0b\uff0c\u76f4\u63a5python+\u7a7a\u683c+express\u8def\u5f84\uff0cexpress\u52a0\u5f15\u53f7\u6216\u4e0d\u52a0\u90fd\u53ef\u4ee5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/python express\uff0cexpress\u52a0\u5f15\u53f7\u6216\u4e0d\u52a0\u90fd\u53ef\u4ee5\nhenryuos@henryuos:~$ python '\/home\/henryuos\/Desktop\/pyTest\/fireworks.py'\n  File \"\/home\/henryuos\/Desktop\/pyTest\/fireworks.py\", line 1\nSyntaxError: Non-ASCII character '\\xe4' in file \/home\/henryuos\/Desktop\/pyTest\/fireworks.py on line 1, but no encoding declared; see http:\/\/python.org\/dev\/peps\/pep-0263\/ for details\n\n\/\/\u4e0a\u9762\u7684\u60c5\u51b5\uff0c\u5728py\u6587\u4ef6\u7b2c\u4e00\u53e5\u4e2d\u52a0\u5165\n# coding:utf-8\uff0c\u53c2\u8003\u300a<a href=\"https:\/\/jingyan.baidu.com\/article\/219f4bf7d04887de442d3899.html\" data-type=\"URL\" data-id=\"https:\/\/jingyan.baidu.com\/article\/219f4bf7d04887de442d3899.html\">\u600e\u4e48\u89e3\u51b3python \"Non-ASCII character\"\u9519\u8bef<\/a>\u300b\n\nhenryuos@henryuos:~\/PycharmProjects\/pythonProject\/venv\/bin$ python \/home\/henryuos\/Desktop\/pyTest\/fireworks.py\n\u4f7f\u7528print()\u8f93\u51fa\u4e00\u53e5\u8bdd<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u662f\u5728windows\u4e0b\u7684CMD\u7a97\u53e3\uff0c\u8def\u5f84\u4f1a\u52a0\u4e0a\u76d8\u7b26\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>windows\u7684cmd\u7a97\u53e3\u4e2d\npython D:\\ceshi.py<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7ec8\u7aef\u8fdb\u5165Python\u7684\u4ea4\u4e92\u6a21\u5f0f<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u7cfb\u7edf\u7ec8\u7aef\u4e2d\u8f93\u5165python\u8fdb\u5165python\u7684\u4ea4\u4e92\u6a21\u5f0f\uff0c\n\/\/\u53ea\u80fd\u5199python\u7684\u4ee3\u7801\uff0c\n\/\/\u6216\u8005\u8fd0\u884c.py\u6587\u4ef6\u3010exec(open().read()\u3011\uff0c\u53c2\u8003\u300a<a href=\"https:\/\/www.cnblogs.com\/linxiyue\/p\/7732555.html\">exec\u548cexecfile<\/a>\u300b\n\/\/\u6216\u8005import\n\n\/\/\u5199python\u7684\u8bed\u53e5\uff0c\n&gt;&gt;&gt; 1+2\n3\n\n\/\/\u6216\u8005\u8fd0\u884c.py\u6587\u4ef6\u3010exec(open().read()\u3011\nhenryuos@henryuos:~$ python\nPython 2.7.16 (default, Feb 26 2021, 06:12:30) \n&#91;GCC 8.3.0] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; exec(open('\/home\/henryuos\/Desktop\/pyTest\/fireworks.py').read())\n\u4f7f\u7528print()\u8f93\u51fa\u4e00\u53e5\u8bdd\n\n\/\/\u5207\u6362\u5230\u811a\u672c\u76ee\u5f55\u4e0b\uff0c\u7528import\u5f15\u5165,\u4e0d\u80fd\u5e26.py\uff0c\u518d\u6b21\u5f15\u7528\u5c31\u6ca1\u6709\u201c\u4f7f\u7528print()\u8f93\u51fa\u4e00\u53e5\u8bdd\u201d\u8fd9\u4e2a\u4e86\u3002\n\/\/\u5207\u6362\u8def\u5f84\u53c2\u8003\u300a<a href=\"http:\/\/www.py.cn\/faq\/python\/17175.html\">Python\u5728\u547d\u4ee4\u884c\u5982\u4f55\u5207\u6362\u76ee\u5f55<\/a>\u300b\n&gt;&gt;&gt; import os\n&gt;&gt;&gt; os.chdir('\/home\/henryuos\/Desktop\/pyTest\/')\n&gt;&gt;&gt; import fireworks\n\u4f7f\u7528print()\u8f93\u51fa\u4e00\u53e5\u8bdd\n&gt;&gt;&gt; import fireworks\n&gt;&gt;&gt; \n\n\u6216\u8005\u5207\u6362\u5230\u76ee\u5f55\u540e\uff0c\u76f4\u63a5\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u53c2\u8003\u300a<a href=\"https:\/\/www.zhihu.com\/question\/51290977\/answer\/135304134\" data-type=\"URL\" data-id=\"https:\/\/www.zhihu.com\/question\/51290977\/answer\/135304134\">\u5728python\u4ea4\u4e92\u6a21\u5f0f\u4e2d\u600e\u4e48\u8fd0\u884cpy\u6587\u4ef6? - \u9ece\u534e\u7684\u56de\u7b54 - \u77e5\u4e4e<\/a>\u300b\n&gt;&gt;&gt; fireworks\n&lt;module 'fireworks' from 'fireworks.pyc'&gt;\n\n\n\u4ea4\u4e92\u5f0f\u7a97\u53e3\uff0c\u9000\u51fa\u7528exit()\uff0c\u5373\u53ef\u9000\u56de\u5230\u7ec8\u7aef\u72b6\u6001<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">IDE\u96c6\u6210\u5f00\u53d1\u73af\u5883<\/h3>\n\n\n\n<p>\u76ee\u524d\u53ea\u6d4b\u8bd5\u4e86pycharm\uff08community\u7248\u672c\uff09\u3002\u6700\u4e0b\u9762\u6709terminal\u548cpython console\u7a97\u53e3\uff0c\u5bf9\u5e94\u7684\u662f\u7cfb\u7edf\u7ec8\u7aef\u548cpython\u4ea4\u4e92\u6a21\u5f0f\u3002\u53c2\u8003\u56fe\u7247\u5728\u300a<a href=\"https:\/\/blog.csdn.net\/hanli1992\/article\/details\/86363381\/\">Pycharm\u4e2d\u7684Python Console\u4e0eTerminal<\/a>\u300b\u3002<\/p>\n\n\n\n<p>\u4f46\u662f\uff0cpycharm\u7684terminal\u91cc\u9762\u76f4\u63a5\u662f\u4e0b\u9762\u4ee3\u7801\u5f00\u5934<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u201c(venv) henryuos@henryuos:~\/PycharmProjects\/pythonProject$\u201d\uff0c<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u4f7f\u7528pip\u7b49\u547d\u4ee4\u3002\u7cfb\u7edf\u7684\u7ec8\u7aef\u4e0d\u80fd\u7528pip\uff0c\u5207\u6362\u5230\u5bf9\u5e94\u76ee\u5f55\u4e5f\u4e0d\u884c\uff08\u89c1\u4e0b\u9762\u4ee3\u7801\u5757\uff09\u3002\u770b\u5230\u7f51\u4e0a\u6709\u63d0\u5230\u201c\u73af\u5883\u53d8\u91cf\u8def\u5f84Path\u201d\u5728java\u7b49\u7f16\u7a0b\u73af\u5883\u5b89\u88c5\u6559\u7a0b\u4e2d\u770b\u5230\uff0c\u53ef\u80fd\u4e0e\u6b64\u6709\u5173\u3002\u518d\u8005\uff0c\u770b\u5230\u547d\u4ee4\u884c\u662f\u641c\u7d22\u5f53\u524d\u76ee\u5f55\uff0ccharm\u662f\u9879\u76ee\u76ee\u5f55\u3002\u53c2\u8003\u300a<a href=\"https:\/\/blog.csdn.net\/sinat_33718563\/article\/details\/88976640\" data-type=\"URL\" data-id=\"https:\/\/blog.csdn.net\/sinat_33718563\/article\/details\/88976640\">python\u5bfc\u5165\u6a21\u5757\u62a5\u9519\u201cImportError: No module namedXXX\u201d<\/a>\u300b\uff08\u53ef\u80fd\u548c\u8fd9\u91cc\u4e0d\u662f\u4e00\u56de\u4e8b\uff09\u6216\u8005\u300a<a href=\"https:\/\/www.zhihu.com\/question\/51290977\/answer\/135304134\" data-type=\"URL\" data-id=\"https:\/\/www.zhihu.com\/question\/51290977\/answer\/135304134\">\u5728python\u4ea4\u4e92\u6a21\u5f0f\u4e2d\u600e\u4e48\u8fd0\u884cpy\u6587\u4ef6? &#8211; \u9ece\u534e\u7684\u56de\u7b54 &#8211; \u77e5\u4e4e<\/a>\u300b\u4e2d\u63d0\u5230\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u6709\u5174\u8da3\u53ef\u4ee5\u53bb\u5b66\u4e60\u4e00\u4e0b\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5Pycharm\uff0c\u53c2\u8003\u83dc\u9e1f\u6559\u7a0b\u300a<a href=\"https:\/\/www.runoob.com\/python\/python-install.html\">Python\u73af\u5883\u642d\u5efa<\/a>\u300b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>henryuos@henryuos:~$ pip install pygame\nbash: pip\uff1a\u672a\u627e\u5230\u547d\u4ee4\nhenryuos@henryuos:~$ cd ~\/PycharmProjects\/pythonProject\nhenryuos@henryuos:~\/PycharmProjects\/pythonProject$ pip show pygame\nbash: pip\uff1a\u672a\u627e\u5230\u547d\u4ee4\nhenryuos@henryuos:~\/PycharmProjects\/pythonProject$ pip list\nbash: pip\uff1a\u672a\u627e\u5230\u547d\u4ee4\nhenryuos@henryuos:~\/PycharmProjects\/pythonProject$ pip\nbash: pip\uff1a\u672a\u627e\u5230\u547d\u4ee4<\/code><\/pre>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>0\u3001\u67e5\u770bpython\u7684\u7248\u672c UOS\u7cfb\u7edf\u672c\u8eab\u81ea\u5e26python\uff0c\u65e0\u9700\u53e6\u5916\u5b89\u88c5\u3002\u5728\u7ec8\u7aef\u76f4\u63a5\u8fd0\u884cpython -V\u548cP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,49],"tags":[],"_links":{"self":[{"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/posts\/706"}],"collection":[{"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":8,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":787,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/posts\/706\/revisions\/787"}],"wp:attachment":[{"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.henrycome.com\/wordpress\/wp-json\/wp\/v2\/tags?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}