{"id":337,"date":"2018-07-16T00:22:45","date_gmt":"2018-07-15T16:22:45","guid":{"rendered":"http:\/\/blog.lovexu.cc\/?p=337"},"modified":"2018-07-16T00:22:45","modified_gmt":"2018-07-15T16:22:45","slug":"%e3%80%90python%e3%80%91%e5%ae%89%e8%a3%85python3-7%e5%87%ba%e7%8e%b0modulenotfounderror-no-module-named-_ctypes%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/lox.im\/index.php\/337.html","title":{"rendered":"\u3010python\u3011\u5b89\u88c5python3.7\u51fa\u73b0ModuleNotFoundError: No module named \u2018_ctypes\u2019\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>\u8f6c\u8f7d\u81ea\u4e92\u8054\u7f51<\/p>\n<p>ModuleNotFoundError: No module named \u2018_ctypes\u2019<\/p>\n<pre class=\"lang:default decode:true \">Traceback (most recent call last):\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/ensurepip\/__main__.py\", line 5, in &lt;module&gt;\r\n    sys.exit(ensurepip._main())\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/ensurepip\/__init__.py\", line 204, in _main\r\n    default_pip=args.default_pip,\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/ensurepip\/__init__.py\", line 117, in _bootstrap\r\n    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/ensurepip\/__init__.py\", line 27, in _run_pip\r\n    import pip\r\n  File \"\/tmp\/tmpnfe1bbxk\/pip-9.0.3-py2.py3-none-any.whl\/pip\/__init__.py\", line 45, in &lt;module&gt;\r\n  File \"\/tmp\/tmpnfe1bbxk\/pip-9.0.3-py2.py3-none-any.whl\/pip\/vcs\/mercurial.py\", line 9, in &lt;module&gt;\r\n  File \"\/tmp\/tmpnfe1bbxk\/pip-9.0.3-py2.py3-none-any.whl\/pip\/download.py\", line 36, in &lt;module&gt;\r\n  File \"\/tmp\/tmpnfe1bbxk\/pip-9.0.3-py2.py3-none-any.whl\/pip\/utils\/glibc.py\", line 4, in &lt;module&gt;\r\n  File \"\/home\/wfq\/soft\/Python-3.7.0b3\/Lib\/ctypes\/__init__.py\", line 7, in &lt;module&gt;\r\n    from _ctypes import Union, Structure, Array\r\nModuleNotFoundError: No module named '_ctypes'\r\nmake: *** [install] Error 1\r\n<\/pre>\n<h4>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/h4>\n<pre class=\"lang:default decode:true \">yum update\r\nyum upgrade\r\nyum dist-upgrade\r\nyum install build-essential python-dev python-setuptools python-pip python-smbus\r\nyum install build-essential libncursesw5-dev libgdbm-dev libc6-dev\r\nyum install zlib1g-dev libsqlite3-dev tk-dev\r\nyum install libssl-dev openssl\r\nyum install libffi-dev<\/pre>\n<p>\u518d\u91cd\u65b0\u7f16\u8bd1\u5b89\u88c5python3.7\u5373\u53ef\u6210\u529f \u3002<\/p>\n<p>\u539f\u95ee\u9898\uff1ahttps:\/\/stackoverflow.com\/questions\/27022373\/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\u81ea\u4e92\u8054\u7f51 ModuleNotFoundError: No module named \u2018_ctypes\u2019 Traceback ( &#8230;<\/p>\n","protected":false},"author":1,"featured_media":338,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[11],"class_list":["post-337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","tag-11"],"_links":{"self":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":0,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media\/338"}],"wp:attachment":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}