{"id":42838,"date":"2024-10-04T05:57:03","date_gmt":"2024-10-03T21:57:03","guid":{"rendered":"https:\/\/server.hk\/cnblog\/42838\/"},"modified":"2024-10-04T05:57:04","modified_gmt":"2024-10-03T21:57:04","slug":"centos-7-%e4%b8%8b%e6%90%ad%e5%bb%ba-python-2-7-pyqt-4-11-3-eric-4-0-%e9%96%8b%e7%99%bc%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/42838\/","title":{"rendered":"CentOS 7 \u4e0b\u642d\u5efa Python 2.7 + PyQt 4.11.3 + Eric 4.0 \u958b\u767c\u5e73\u53f0"},"content":{"rendered":"<h1 id=\"centos-7-%e4%b8%8b%e6%90%ad%e5%bb%ba-python-2-7-pyqt-4-11-3-eric-4-0-%e9%96%8b%e7%99%bc%e5%b9%b3%e5%8f%b0-yvbDxIcZny\">CentOS 7 \u4e0b\u642d\u5efa Python 2.7 + PyQt 4.11.3 + Eric 4.0 \u958b\u767c\u5e73\u53f0<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u8edf\u9ad4\u958b\u767c\u74b0\u5883\u4e2d\uff0cPython \u4f5c\u70ba\u4e00\u7a2e\u9ad8\u6548\u4e14\u6613\u65bc\u5b78\u7fd2\u7684\u7a0b\u5f0f\u8a9e\u8a00\uff0c\u53d7\u5230\u5ee3\u6cdb\u7684\u6b61\u8fce\u3002\u7279\u5225\u662f\u5c0d\u65bc\u684c\u9762\u61c9\u7528\u7a0b\u5f0f\u7684\u958b\u767c\uff0cPyQt \u63d0\u4f9b\u4e86\u4e00\u500b\u5f37\u5927\u7684\u5de5\u5177\u96c6\uff0c\u8b93\u958b\u767c\u8005\u80fd\u5920\u5feb\u901f\u69cb\u5efa GUI \u61c9\u7528\u7a0b\u5f0f\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS 7 \u4e0a\u642d\u5efa Python 2.7\u3001PyQt 4.11.3 \u548c Eric 4.0 \u958b\u767c\u5e73\u53f0\u3002<\/p>\n<h2 id=\"%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99-yvbDxIcZny\">\u74b0\u5883\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u4e4b\u524d\uff0c\u78ba\u4fdd\u4f60\u7684 CentOS 7 \u7cfb\u7d71\u5df2\u7d93\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u66f4\u65b0\uff1a<\/p>\n<pre><code>sudo yum update<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5b89\u88dd\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305\uff1a<\/p>\n<pre><code>sudo yum install gcc gcc-c++ python-devel qt-devel<\/code><\/pre>\n<h2 id=\"%e5%ae%89%e8%a3%9d-python-2-7-yvbDxIcZny\">\u5b89\u88dd Python 2.7<\/h2>\n<p>CentOS 7 \u9810\u8a2d\u5b89\u88dd\u7684\u662f Python 2.7\uff0c\u4f46\u5982\u679c\u9700\u8981\u91cd\u65b0\u5b89\u88dd\u6216\u78ba\u8a8d\u7248\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>python --version<\/code><\/pre>\n<p>\u5982\u679c\u672a\u5b89\u88dd\uff0c\u5247\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88dd\uff1a<\/p>\n<pre><code>sudo yum install python<\/code><\/pre>\n<h2 id=\"%e5%ae%89%e8%a3%9d-pyqt-4-11-3-yvbDxIcZny\">\u5b89\u88dd PyQt 4.11.3<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u6211\u5011\u9700\u8981\u5b89\u88dd PyQt\u3002\u7531\u65bc PyQt 4.11.3 \u53ef\u80fd\u4e0d\u5728\u9810\u8a2d\u7684 Yum \u5009\u5eab\u4e2d\uff0c\u56e0\u6b64\u9700\u8981\u5f9e\u6e90\u78bc\u5b89\u88dd\u3002\u9996\u5148\uff0c\u4e0b\u8f09 PyQt \u7684\u6e90\u78bc\u5305\uff1a<\/p>\n<pre><code>wget https:\/\/www.riverbankcomputing.com\/static\/Downloads\/PyQt4\/4.11.3\/PyQt4_gpl-4.11.3.tar.gz<\/code><\/pre>\n<p>\u89e3\u58d3\u7e2e\u4e0b\u8f09\u7684\u6a94\u6848\uff1a<\/p>\n<pre><code>tar -xzf PyQt4_gpl-4.11.3.tar.gz<\/code><\/pre>\n<p>\u9032\u5165\u89e3\u58d3\u5f8c\u7684\u76ee\u9304\uff0c\u7136\u5f8c\u904b\u884c\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u5b89\u88dd\uff1a<\/p>\n<pre><code>cd PyQt4_gpl-4.11.3\npython configure.py\nmake\nsudo make install<\/code><\/pre>\n<h2 id=\"%e5%ae%89%e8%a3%9d-eric-4-0-yvbDxIcZny\">\u5b89\u88dd Eric 4.0<\/h2>\n<p>Eric \u662f\u4e00\u500b\u57fa\u65bc PyQt \u7684 Python IDE\uff0c\u9069\u5408\u7528\u65bc\u958b\u767c PyQt \u61c9\u7528\u7a0b\u5f0f\u3002\u9996\u5148\uff0c\u4e0b\u8f09 Eric \u7684\u6e90\u78bc\u5305\uff1a<\/p>\n<pre><code>wget https:\/\/eric-ide.python-projects.org\/eric4\/eric4-4.0.tar.gz<\/code><\/pre>\n<p>\u89e3\u58d3\u7e2e\u4e26\u5b89\u88dd Eric\uff1a<\/p>\n<pre><code>tar -xzf eric4-4.0.tar.gz\ncd eric4-4.0\npython install.py<\/code><\/pre>\n<h2 id=\"%e9%85%8d%e7%bd%ae%e9%96%8b%e7%99%bc%e7%92%b0%e5%a2%83-yvbDxIcZny\">\u914d\u7f6e\u958b\u767c\u74b0\u5883<\/h2>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u53ef\u4ee5\u555f\u52d5 Eric IDE \u4f86\u958b\u59cb\u958b\u767c\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5 Eric\uff1a<\/p>\n<pre><code>eric4<\/code><\/pre>\n<p>\u5728 Eric \u4e2d\uff0c\u4f60\u53ef\u4ee5\u5275\u5efa\u65b0\u7684 PyQt \u61c9\u7528\u7a0b\u5f0f\uff0c\u4e26\u5229\u7528\u5176\u5f37\u5927\u7684\u529f\u80fd\u9032\u884c\u958b\u767c\u3002Eric \u63d0\u4f9b\u4e86\u4ee3\u78bc\u88dc\u5168\u3001\u8abf\u8a66\u5de5\u5177\u548c\u7248\u672c\u63a7\u5236\u7b49\u529f\u80fd\uff0c\u80fd\u5920\u5927\u5927\u63d0\u9ad8\u958b\u767c\u6548\u7387\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-yvbDxIcZny\">\u7e3d\u7d50<\/h2>\n<p>\u5728 CentOS 7 \u4e0a\u642d\u5efa Python 2.7\u3001PyQt 4.11.3 \u548c Eric 4.0 \u958b\u767c\u5e73\u53f0\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u901a\u904e\u4e0a\u8ff0\u6b65\u9a5f\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u958b\u59cb\u958b\u767c\u81ea\u5df1\u7684\u684c\u9762\u61c9\u7528\u7a0b\u5f0f\u3002\u7121\u8ad6\u662f\u5b78\u7fd2\u9084\u662f\u5be6\u969b\u958b\u767c\uff0c\u9019\u500b\u74b0\u5883\u90fd\u80fd\u63d0\u4f9b\u826f\u597d\u7684\u652f\u6301\u3002<\/p>\n<p>\u5982\u679c\u4f60\u9700\u8981\u7a69\u5b9a\u7684\u958b\u767c\u74b0\u5883\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u4f86\u642d\u5efa\u4f60\u7684\u4f3a\u670d\u5668\uff0c\u9019\u6a23\u53ef\u4ee5\u96a8\u6642\u96a8\u5730\u9032\u884c\u958b\u767c\u548c\u6e2c\u8a66\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to set up a Python 2.7, PyQt 4.11.3, and Eric 4.0 development environment on CentOS 7 for efficient application development.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-42838","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=42838"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42838\/revisions"}],"predecessor-version":[{"id":42839,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42838\/revisions\/42839"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=42838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=42838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=42838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}