eric7+pyqt6:快速安装


今天本来要安装eric6+pyqt5,没想到最终安装了eric7+pyqt6,最新的组合还没有用过,先记录安装过程。先下载程序:

Python 版本:3.10.6 ——官网:https://www.python.org/downloads/release/python-3106/
Eric7 版本:22.8.1 ——官网:http://eric-ide.python-projects.org/eric-download.html

1.下载python并安装

打开官网,目前比较新的版本是 3.10.6,我就选这个版本:
在这里插入图片描述

下载后,直接点击运行,进入安装界面:
在这里插入图片描述
没有需要操作的界面就略过,直接下一步:
在这里插入图片描述
一直到安装完成。

2.更新安装工具pip到最新版本

在python安装目录下(我的是 D:\python),打开shell命令行:

在python的安装目录下,新建文件《新建文本文档.txt》,写入 cmd.exe 这7个字符 ,保存,再更改文件名为《cmd.bat》,双击 cmd.bat文件,就可以在当前目录打开shell。

首先要更新pip,pip 是 Python 包管理工具,该工具提供了对Python包的查找、下载、安装、卸载的功能。pip 是一个命令行程序。安装pip后,会向系统添加一个pip命令,该命令可以从命令提示符运行。
原来我使用python3.8.7自带的pip 版本是 20.0.1,现在python3.10.6自带的pip版本是 22.2.1,这些统统不行,必须是最新的 22.2.2

【1】pip更新到最新版本
python.exe -m pip install --upgrade pip

在这里插入图片描述

3.下载eric7并安装

打开上面的官网,点击windows版本,下载:
在这里插入图片描述
解压文件:
在这里插入图片描述
接下来会自动完成安装依赖包,我把重点信息列出来:

Checking dependencies

Successfully installed PyQt6-6.3.1 PyQt6-Qt6-6.3.1 PyQt6-sip-13.4.0
Found PyQt6
Found pyuic6

Successfully installed PyQt6-WebEngine-6.3.1 PyQt6-WebEngine-Qt6-6.3.1

Successfully installed PyQt6-Charts-6.3.1 PyQt6-Charts-Qt6-6.3.1

Successfully installed PyQt6-QScintilla-2.13.3
Found PyQt6-QScintilla
Found QtGui
Found QtNetwork
Found QtPrintSupport
Found QtSql
Found QtSvg
Found QtSvgWidgets
Found QtWidgets

Successfully installed docutils-0.19

Successfully installed Markdown-3.4.1

Successfully installed pyyaml-6.0

Successfully installed tomlkit-0.11.4

Successfully installed chardet-5.0.0

Successfully installed asttokens-2.0.8 six-1.16.0

Successfully installed EditorConfig-0.12.3

Successfully installed Send2Trash-1.8.0

Successfully installed Pygments-2.13.0

Successfully installed pyenchant-3.2.2

Successfully installed wheel-0.37.1

Successfully installed parso-0.8.3

Successfully installed jedi-0.18.1

Successfully installed cyclonedx-python-lib-2.7.1 packageurl-python-0.10.1 sortedcontainers-2.4.0

Successfully installed cyclonedx-bom-3.5.0 pip-requirements-parser-31.2.0

Successfully installed trove-classifiers-2022.8.24

Successfully installed black-22.6.0 click-8.1.3 colorama-0.4.5 mypy-extensions-0.4.3 pathspec-0.9.0 platformdirs-2.5.2 tomli-2.0.1

Successfully installed qt6-applications-6.1.0.2.2

Version Information
-------------------
Python: 3.10.6
Qt6: 6.3.1
sip: 6.6.2
PyQt6: 6.3.1
PyQt6-QScintilla: 2.13.3
PyQt6-WebEngine: 6.3.1

All dependencies ok.

Cleaning up old installation ...

Creating configuration file ...

Compiling user interface files ...

Compiling source files ...

Installing eric ...
Installing Python API files to 'D:\python\Lib\site-packages\eric7\api\python'.
Installing Ruby API files to 'D:\python\Lib\site-packages\eric7\api\ruby'.
Installing QSS API files to 'D:\python\Lib\site-packages\eric7\api\qss'.

Installation complete.

Press enter to continue...

安装完成,桌面多了两个图标:
在这里插入图片描述

4.测试运行eric7+pyqt6

双击桌面图标就可以运行eric7,现在打开工程有2个后缀名选择 epje4p
在这里插入图片描述
e4p是使用eric6+pyqt5创建的工程名称,eric7一样可以打开,测试运行程序,和eric6+pyqt5的组合基本没什么区别。
在这里插入图片描述

附录:
1.Ubuntu python3.10 安装教程,并更新python,pip默认指向为python3.10, pip3(超详细教程)
https://www.iotword.com/2390.html

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以回答你的问题。对于Python软件页面制作入门,使用PyQt架构可以非常方便地实现界面程序。以下是一个入门示例,介绍如何使用PyQt设计师创建简单的界面程序。 1. 安装PyQt 首先,你需要安装PyQt。你可以使用pip进行安装: ``` pip install pyqt5 ``` 2. 创建一个界面程序 PyQt提供了Qt Designer,一个强大的可视化工具,可以帮助你创建和编辑界面。你可以使用Qt Designer来创建一个简单的界面程序。 在Qt Designer中,你可以添加各种控件,例如按钮、标签和文本框等。在这个示例中,我们将添加一个标签和一个按钮。 3. 将界面程序导出到Python文件 完成界面程序的设计后,你需要将其导出到Python代码中。在Qt Designer中,你可以选择“文件”>“导出”,然后选择“Python代码”作为导出类型。然后,你可以将导出的代码保存到一个.py文件中。 4. 编写Python代码 使用PyQt来编写Python代码,将界面程序与功能代码相结合。在这个示例中,我们将在按钮单击时显示一个消息框。 ```python import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox from ui_mainwindow import Ui_MainWindow class MainWindow(QMainWindow): def __init__(self): super().__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.pushButton.clicked.connect(self.show_message_box) def show_message_box(self): QMessageBox.information(self, "提示", "你单击了按钮!") if __name__ == "__main__": app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_()) ``` 在这个示例中,我们首先导入QApplication、QMainWindow和QMessageBox类,以及从Qt Designer导出的UI类。 接下来,我们创建一个MainWindow类,继承自QMainWindow,并在其中初始化UI界面。我们还使用connect()函数将按钮的单击事件连接到一个名为show_message_box()的函数上。 最后,我们创建一个QApplication实例,并将MainWindow实例显示出来。在应用程序退出时,我们调用sys.exit()函数。 5. 运行程序 现在,你可以运行程序并测试它是否能正常工作。在命令行中,进入包含你的Python文件的目录,并输入以下命令: ``` python main.py ``` 你应该能够看到一个包含一个标签和一个按钮的窗口。当你单击按钮时,应该会显示一个消息框。 这就是如何使用PyQt和Qt Designer创建简单的界面程序的入门示例。希望这对你有所帮助!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值