{"id":15489,"date":"2025-01-12T20:52:10","date_gmt":"2025-01-12T12:52:10","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489"},"modified":"2025-01-16T16:10:13","modified_gmt":"2025-01-16T08:10:13","slug":"python%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489","title":{"rendered":"python\u6e90\u7801\u7f16\u8bd1"},"content":{"rendered":"<p>python\u6e90\u7801github\u4e0b\u8f7d\uff1a<a href=\"https:\/\/github.com\/python\/cpython\">https:\/\/github.com\/python\/cpython<\/a>\uff0c   <a href=\"https:\/\/github.com\/python\/cpython\/releases\/tag\/2.7\">https:\/\/github.com\/python\/cpython\/releases\/tag\/2.7<\/a> <\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#python2%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91\" title=\"python2\u6e90\u7801\u7f16\u8bd1\">python2\u6e90\u7801\u7f16\u8bd1<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98\" title=\"\u7f16\u8bd1\u95ee\u9898\">\u7f16\u8bd1\u95ee\u9898<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#1configure_error_installation_or_configuration_problem_C_compiler_cannot_create_executables\" title=\"1.configure: error: installation or configuration problem: C compiler cannot create executables.\">1.configure: error: installation or configuration problem: C compiler cannot create executables.<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#2Includepyporth_372_2_error_error_%22could_not_set_LONG_MAX_in_pyporth%22\" title=\"2..\/..\/Include\/pyport.h:372:2: error: #error &quot;could not set LONG_MAX in pyport.h&quot;\">2..\/..\/Include\/pyport.h:372:2: error: #error &quot;could not set LONG_MAX in pyport.h&quot;<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#3_static_declaration_of_xx_follows_non-static_declaration\" title=\"3. static declaration of \u2018xx\u2019 follows non-static declaration`\">3. static declaration of \u2018xx\u2019 follows non-static declaration`<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#1%EF%BC%89listobjectc_1547_21_error_static_declaration_of_immutable_list_type_follows_non-static_declaration\" title=\"1\uff09listobject.c:1547:21: error: static declaration of \u2018immutable_list_type\u2019 follows non-static declaration\">1\uff09listobject.c:1547:21: error: static declaration of \u2018immutable_list_type\u2019 follows non-static declaration<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#2%EF%BC%89threadmodulec_156_21_error_static_declaration_of_Locktype_follows_non-static_declaration\" title=\"2\uff09.\/threadmodule.c:156:21: error: static declaration of \u2018Locktype\u2019 follows non-static declaration\">2\uff09.\/threadmodule.c:156:21: error: static declaration of \u2018Locktype\u2019 follows non-static declaration<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15489\/#3\" title=\"3)\">3)<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"python2%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91\"><\/span>python2\u6e90\u7801\u7f16\u8bd1<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u7f16\u8bd1\u4e3b\u673a\u73af\u5883\uff1a<\/p>\n<pre><code class=\"language-bash\">Distributor ID: Ubuntu\nDescription:    Ubuntu 24.10\nRelease:        24.10\nCodename:       oracular\n\nLinux ubuntu-main 6.11.0-13-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov 30 23:51:51 UTC 2024 x86_64 x86_64 x86_64 GNU\/Linux<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98\"><\/span>\u7f16\u8bd1\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1configure_error_installation_or_configuration_problem_C_compiler_cannot_create_executables\"><\/span>1.<code>configure: error: installation or configuration problem: C compiler cannot create executables.<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">root@ubuntu-main:\/home\/xinyi\/python\/Python-2.0# sudo .\/configure \nloading cache .\/config.cache\nchecking MACHDEP... linux6\nchecking for --without-gcc... no\nchecking for --with-cxx=&lt;compiler&gt;... no\nchecking for gcc... gcc\nchecking whether the C compiler (gcc  ) works... no\nconfigure: error: installation or configuration problem: C compiler cannot create executables.<\/code><\/pre>\n<p>\u901a\u8fc7\u67e5\u770bconfigure\u6e90\u7801\uff0c\u5f97\u77e5\u67e5\u770bconfig.log\uff0c\u627e\u5230<code>configure:911:1: error: return type defaults to &#039;int&#039; [-Wimplicit-int]<\/code>\uff0c\u5c06911\u884c\u7684main\u51fd\u6570\u52a0\u4e0aint\u8fd4\u56de\u503c\u7c7b\u578b\u5373\u53ef\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2Includepyporth_372_2_error_error_%22could_not_set_LONG_MAX_in_pyporth%22\"><\/span>2.<code>.\/..\/Include\/pyport.h:372:2: error: #error &quot;could not set LONG_MAX in pyport.h&quot;<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">make[1]: \u8fdb\u5165\u76ee\u5f55\u201c\/home\/xinyi\/python\/Python-2.0\/Parser\u201d\ngcc -g -O2 -Wall -Wstrict-prototypes -I.\/..\/Include -I.. -DHAVE_CONFIG_H   -c -o pgenmain.o pgenmain.c\nIn file included from .\/..\/Include\/pymem.h:7,\n                 from .\/..\/Include\/pgenheaders.h:24,\n                 from pgenmain.c:16:\n.\/..\/Include\/pyport.h:372:2: error: #error &quot;could not set LONG_MAX in pyport.h&quot;\n  372 | #error &quot;could not set LONG_MAX in pyport.h&quot;\n      |  ^~~~~\nmake[1]: *** [&lt;\u5185\u7f6e&gt;\uff1apgenmain.o] \u9519\u8bef 1\nmake[1]: \u79bb\u5f00\u76ee\u5f55\u201c\/home\/xinyi\/python\/Python-2.0\/Parser\u201d\nmake: *** [Makefile:195\uff1aParser] \u9519\u8bef 2\n\n#### failed to build some targets  ####<\/code><\/pre>\n<p>\u5b9a\u4e49<code>#define SIZEOF_LONG 8<\/code>\u5373\u4e0d\u4f1a\u62a5\u9519<\/p>\n<pre><code class=\"language-bash\">#define SIZEOF_LONG 8\n#ifndef LONG_MAX\n#if SIZEOF_LONG == 4\n#define LONG_MAX 0X7FFFFFFFL\n#elif SIZEOF_LONG == 8\n#define LONG_MAX 0X7FFFFFFFFFFFFFFFL\n#else\n#error &quot;could not set LONG_MAX in pyport.h&quot;\n#endif\n#endif<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"3_static_declaration_of_xx_follows_non-static_declaration\"><\/span>3. static declaration of \u2018xx\u2019 follows non-static declaration`<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"1%EF%BC%89listobjectc_1547_21_error_static_declaration_of_immutable_list_type_follows_non-static_declaration\"><\/span>1\uff09<code>listobject.c:1547:21: error: static declaration of \u2018immutable_list_type\u2019 follows non-static declaration<\/code><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-bash\">listobject.c:1547:21: error: static declaration of \u2018immutable_list_type\u2019 follows non-static declaration\n 1547 | static PyTypeObject immutable_list_type = {\n      |                     ^~~~~~~~~~~~~~~~~~~\n<\/code><\/pre>\n<p>static\u6539\u4e3aextern<\/p>\n<h4><span class=\"ez-toc-section\" id=\"2%EF%BC%89threadmodulec_156_21_error_static_declaration_of_Locktype_follows_non-static_declaration\"><\/span>2\uff09<code>.\/threadmodule.c:156:21: error: static declaration of \u2018Locktype\u2019 follows non-static declaration<\/code><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>static\u6539\u4e3aextern<\/p>\n<h4><span class=\"ez-toc-section\" id=\"3\"><\/span>3)<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-bash\">.\/_sre.c:1804:25: error: static declaration of \u2018Pattern_Type\u2019 follows non-static declaration\n 1804 | statichere PyTypeObject Pattern_Type = {\n      |                         ^~~~~~~~~~~~\n.\/_sre.c:1170:28: note: previous declaration of \u2018Pattern_Type\u2019 with type \u2018PyTypeObject\u2019 {aka \u2018struct _typeobject\u2019}\n 1170 | staticforward PyTypeObject Pattern_Type;\n      |                            ^~~~~~~~~~~~\n.\/_sre.c:2203:25: error: static declaration of \u2018Match_Type\u2019 follows non-static declaration\n 2203 | statichere PyTypeObject Match_Type = {\n      |                         ^~~~~~~~~~\n.\/_sre.c:1171:28: note: previous declaration of \u2018Match_Type\u2019 with type \u2018PyTypeObject\u2019 {aka \u2018struct _typeobject\u2019}\n 1171 | staticforward PyTypeObject Match_Type;\n      |                            ^~~~~~~~~~\n.\/_sre.c:2311:25: error: static declaration of \u2018Scanner_Type\u2019 follows non-static declaration\n 2311 | statichere PyTypeObject Scanner_Type = {\n      |                         ^~~~~~~~~~~~<\/code><\/pre>\n<p>statichere\u6539\u4e3aextern<\/p>\n<p>\u592a\u591a\u8fd9\u79cdstatic\u8bed\u6cd5\uff0c\u8fd9\u4e48\u6539\u4e0b\u53bb\u6ca1\u6709\u5c3d\u5934\uff0c\u679c\u65ad\u653e\u5f03\u3002<\/p>\n<p><strong>\u6700\u7ec8\u4f7f\u7528github\u5b98\u65b9\u6e90\u7801\u7f16\u8bd1\uff0c\u5c31\u6ca1\u6709\u4e0a\u9762\u8fd9\u4e9b\u4e71\u4e03\u516b\u7cdf\u7684\u95ee\u9898\u4e86\u3002<\/strong><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"15489\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>python\u6e90\u7801github\u4e0b\u8f7d\uff1ahttps:\/\/github.com\/python\/cpython [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1170],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15489"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15489"}],"version-history":[{"count":12,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15489\/revisions"}],"predecessor-version":[{"id":15505,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15489\/revisions\/15505"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15489"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}