{"id":442890,"date":"2024-12-25T15:05:21","date_gmt":"2024-12-25T15:05:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=442890"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-12-25T15:05:21","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=442890","title":{"rendered":"<span>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 python \u043d\u0430 centos 7<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043b\u0435\u0439\u0431\u0443\u043a \u0430\u043d\u0441\u0438\u0431\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043b\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439<br \/>&gt;&gt;The module failed to execute correctly, you probably need to set the interpreter.\\nSee stdout\/stderr for the exact error<br \/>\u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python 3.6.8, \u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 Python 3.7 \u0438 \u0432\u044b\u0448\u0435.\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u043e\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c Python \u043d\u0430 CentOS 7 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437-\u0437\u0430 EOL (End of Life) \u0441\u0442\u0430\u0442\u0443\u0441\u0430.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Python 3.8 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432:<br \/> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<br \/> sudo yum groupinstall &#171;Development Tools&#187;<br \/> sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make<br \/> \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Python 3.8:<br \/> wget <a href=\"https:\/\/www.python.org\/ftp\/python\/3.8.10\/Python-3.8.10.tgz\" rel=\"noopener noreferrer nofollow\">https:\/\/www.python.org\/ftp\/python\/3.8.10\/Python-3.8.10.tgz<\/a><br \/> \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0430\u0439\u043b \u0441\u043a\u0430\u0447\u0430\u043d, \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0439\u0442\u0435 \u0435\u0433\u043e:<br \/> tar -xvzf Python-3.8.10.tgz<br \/> cd Python-3.8.10<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 .\/configure, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Python \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<br \/> .\/configure &#8212;enable-optimizations &#8212;prefix=\/usr\/local<br \/> &#8212;enable-optimizations \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f Python.<br \/> &#8212;prefix=\/usr\/local \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Python (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \/usr\/local\/bin\/python3.8).<br \/>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438:<br \/> make -j$(nproc)<br \/> sudo make altinstall<br \/>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Python 3.8 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<br \/> python3.8 &#8212;version<br \/>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 Python 3.8 \u0432 PATH (\u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e). \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c Python 3.8 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 python (\u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 python3.8), \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443:<br \/> sudo ln -s \/usr\/local\/bin\/python3.8 \/usr\/bin\/python3.8<br \/> sudo ln -s \/usr\/local\/bin\/pip3.8 \/usr\/bin\/pip3.8<br \/>PS: \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0442 chatGPT (\u0443 \u043c\u0435\u043d\u044f \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e).<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/874\/50f\/4c0\/87450f4c0123806b9dee680d778a0fb6.png\" width=\"336\" height=\"295\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/874\/50f\/4c0\/87450f4c0123806b9dee680d778a0fb6.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/869722\/\"> https:\/\/habr.com\/ru\/articles\/869722\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043b\u0435\u0439\u0431\u0443\u043a \u0430\u043d\u0441\u0438\u0431\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043b\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439<br \/>&gt;&gt;The module failed to execute correctly, you probably need to set the interpreter.\\nSee stdout\/stderr for the exact error<br \/>\u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python 3.6.8, \u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 Python 3.7 \u0438 \u0432\u044b\u0448\u0435.\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u043e\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c Python \u043d\u0430 CentOS 7 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437-\u0437\u0430 EOL (End of Life) \u0441\u0442\u0430\u0442\u0443\u0441\u0430.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Python 3.8 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432:<br \/> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<br \/> sudo yum groupinstall &#171;Development Tools&#187;<br \/> sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make<br \/> \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Python 3.8:<br \/> wget <a href=\"https:\/\/www.python.org\/ftp\/python\/3.8.10\/Python-3.8.10.tgz\" rel=\"noopener noreferrer nofollow\">https:\/\/www.python.org\/ftp\/python\/3.8.10\/Python-3.8.10.tgz<\/a><br \/> \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0430\u0439\u043b \u0441\u043a\u0430\u0447\u0430\u043d, \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0439\u0442\u0435 \u0435\u0433\u043e:<br \/> tar -xvzf Python-3.8.10.tgz<br \/> cd Python-3.8.10<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 .\/configure, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Python \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<br \/> .\/configure &#8212;enable-optimizations &#8212;prefix=\/usr\/local<br \/> &#8212;enable-optimizations \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f Python.<br \/> &#8212;prefix=\/usr\/local \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Python (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \/usr\/local\/bin\/python3.8).<br \/>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438:<br \/> make -j$(nproc)<br \/> sudo make altinstall<br \/>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Python 3.8 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<br \/> python3.8 &#8212;version<br \/>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 Python 3.8 \u0432 PATH (\u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e). \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c Python 3.8 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 python (\u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 python3.8), \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443:<br \/> sudo ln -s \/usr\/local\/bin\/python3.8 \/usr\/bin\/python3.8<br \/> sudo ln -s \/usr\/local\/bin\/pip3.8 \/usr\/bin\/pip3.8<br \/>PS: \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0442 chatGPT (\u0443 \u043c\u0435\u043d\u044f \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e).<\/p>\n<figure class=\"\"><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/869722\/\"> https:\/\/habr.com\/ru\/articles\/869722\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-442890","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/442890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=442890"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/442890\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=442890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=442890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=442890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}