{"id":176460,"date":"2020-04-22T09:00:35","date_gmt":"2020-04-22T01:00:35","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=176460"},"modified":"2020-04-10T09:15:59","modified_gmt":"2020-04-10T01:15:59","slug":"python-ipython-share","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/python-ipython-share.html","title":{"rendered":"Python 3\u5b89\u88c5IPython\u8fc7\u7a0b\u5206\u4eab"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8bb0\u5f55\u5728CentOS 7.5\u4e0bPython 3\u5b89\u88c5IPython\u7684\u8fc7\u7a0b\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u4e00\u3001\u901a\u8fc7\u538b\u7f29\u5305\u5b89\u88c5ipython<\/strong><\/div>\n
1\u3001\u4e0b\u8f7dIPython\u5b89\u88c5\u5305<\/strong><\/span><\/div>\n
$ wget https:\/\/files.pythonhosted.org\/packages\/82\/0a\/146b0f0f1ddf13ab8682aed5c5a42250cddf1082e193ec95b50b03b9f791\/ipython-7.3.0.tar.gz<\/pre>\n
2\u3001\u5b89\u88c5IPython<\/strong><\/span><\/div>\n
[root@localhost ~]# tar xf ipython-7.3.0.tar.gz\r\n[root@localhost ~]# cd ipython-7.3.0\r\n[root@localhost ipython-7.3.0]# pwd\r\n\/root\/ipython-7.3.0\r\n[root@localhost ipython-7.3.0]# python3 setup.py install<\/pre>\n

#\u524d\u63d0\u5df2\u5b89\u88c5python3\uff0c
\n#Linux\u7cfb\u7edf\u5b89\u88c5Python3 \u89c1 : http:\/\/www.cnblogs.com\/chengd\/p\/7078498.html<\/p>\n

3\u3001\u901a\u8fc7pip\u5b89\u88c5ipython\u6240\u6709\u7f3a\u5931\u6a21\u5757\uff0c\u76f4\u81f3ipython\u8fd0\u884c\u6210\u529f<\/strong><\/span><\/div>\n
[root@localhost ipython]# ipython\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/bin\/ipython\", line 4, in <module>\r\n    from IPython import start_ipython\r\n  File \"\/usr\/local\/lib\/python3.7\/site-packages\/IPython\/__init__.py\", line 54, in <module>\r\n    from .core.application import Application\r\n  File \"\/usr\/local\/lib\/python3.7\/site-packages\/IPython\/core\/application.py\", line 23, in <module>\r\n    from traitlets.config.application import Application, catch_config_error\r\nModuleNotFoundError: No module named 'traitlets'<\/pre>\n

#\u8fd0\u884cipython\u662f\u63d0\u793a\u7f3a\u5c11'traitlets'\u6a21\u5757\uff1b
\n#\u5b89\u88c5\u63d0\u793a\u4e00\u6b65\u6b65\u901a\u8fc7pip\u5b89\u88c5\u7f3a\u5931\u6a21\u5757<\/p>\n

[root@localhost ipython]# pip install 'traitlets'\r\nCollecting traitlets\r\n  Downloading https:\/\/files.pythonhosted.org\/packages\/93\/d6\/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a\/traitlets-4.3.2-py2.py3-none-any.whl (74kB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 81kB 100kB\/s \r\nRequirement already satisfied (use --upgrade to upgrade): enum34; python_version == \"2.7\" in \/usr\/lib\/python2.7\/site-packages (from traitlets)\r\nRequirement already satisfied (use --upgrade to upgrade): six in \/usr\/lib\/python2.7\/site-packages (from traitlets)\r\nCollecting ipython-genutils (from traitlets)\r\n  Downloading https:\/\/files.pythonhosted.org\/packages\/fa\/bc\/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a\/ipython_genutils-0.2.0-py2.py3-none-any.whl\r\nRequirement already satisfied (use --upgrade to upgrade): decorator in \/usr\/lib\/python2.7\/site-packages (from traitlets)\r\nInstalling collected packages: ipython-genutils, traitlets\r\nSuccessfully installed ipython-genutils-0.2.0 traitlets-4.3.2\r\nYou are using pip version 8.1.2, however version 19.0.3 is available.\r\nYou should consider upgrading via the 'pip install --upgrade pip' command.<\/pre>\n

\u5347\u7ea7pip<\/p>\n

[root@localhost ipython]# pip install --upgrade pip\r\nCollecting pip\r\n  Downloading https:\/\/files.pythonhosted.org\/packages\/d8\/f3\/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff\/pip-19.0.3-py2.py3-none-any.whl (1.4MB)\r\n    68% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2589          | 921kB 8.5kB\/s eta 0:00:51\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.4MB 73kB\/s \r\nInstalling collected packages: pip\r\n  Found existing installation: pip 8.1.2\r\n    Uninstalling pip-8.1.2:\r\n      Successfully uninstalled pip-8.1.2\r\nSuccessfully installed pip-19.0.3<\/pre>\n

\"\"<\/p>\n

\u4e8c\u3001\u76f4\u63a5\u901a\u8fc7pip\u5b89\u88c5ipython<\/strong><\/div>\n

pip\u5b89\u88c5\u5730\u5740\uff1ahttps:\/\/www.linuxidc.com\/Linux\/2019-02\/157062.htm<\/p>\n

[root@localhost pip-9.0.1]# pip install ipython\r\n[root@localhost pip-9.0.1]# ipython\r\nipython  ipython3  \r\n[root@localhost pip-9.0.1]# ipython3\r\n\/usr\/local\/lib\/python3.6\/site-packages\/IPython\/core\/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved\r\n  warn(\"IPython History requires SQLite, your history will not be saved\")\r\nPython 3.6.1 (default, Jun 26 2017, 09:16:04) \r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.\r\nIn [1]: \r\n#ipython\u5b89\u88c5\u6210\u529f\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

$ wget https:\/\/files.pythonhosted.org\/packages\/82\/0a\/14 […]<\/p>\n","protected":false},"author":310,"featured_media":176468,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-176460","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=176460"}],"version-history":[{"count":10,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176460\/revisions"}],"predecessor-version":[{"id":176553,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176460\/revisions\/176553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/176468"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=176460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=176460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=176460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}