eric6下载
eric官网居然不支持历史版本的下载,只有版本回顾
版本回顾还可以在 这里 看到,带有MD5
翻了几个帖子发现pypi可以下载历史版本:https://pypi.org/project/eric-ide/#history
(pypi的是.tar.gz和.whl,折腾了一下.tar.gz就没继续了,直接用了下面的zip)
下载eric6-19.8.zip,解压,整个文件夹剪到方便访问的目录,改名eric6
安装
cmd路径到eric6,创建虚拟环境pyhton -m venv eric_env
激活虚拟环境eric_venv\scripts\activate
然后python install.py,会报各种缺失依赖包问你是否安装(Y/n),Y,如果装不上包,就手动pip install 包(注意虚拟环境里的pip要手动升到最新版,不然有的包找不到,python -m pip install --upgrade pip)
(eric6_venv) D:\eric6>python install.py
Checking dependencies
Python Version: 3.7.0
Found PyQt5
Found pyuic5
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtPrintSupport
Found QtSql
Found QtSvg
Found QtWidgets
Found QtWebEngineWidgets
Qt Version: 5.15.2
sip Version: 6.7.6
PyQt Version: 5.15.4
QScintilla Version: 2.13.4
All dependencies ok.
虚拟环境安装以后只成功打开过一次,且报错

干脆不建立虚拟环境,重新解压、剪切、改名,cd到所在目录
>python install.py
期间还是安装各种包,安装完成后,桌面会新增图标。
第一次打开,有错误提示
无法定位程序输入点OPENSSL_sk_new_reserve于动态链接库:C:\...\Python37\lib\site-packages\PyQt5\Qt\bin\libssl-1_1.dll上
解决方法见这里:win+s,查python,右键'打开文件位置'(就是上面的C:\...\Python37),把C:\...\Python37\DLLs里的libssl-1_1-x64.dll 覆盖到C:\...\Python37\lib\site-packages\PyQt5\Qt\bin\libssl-1_1.dll
再次打开,无报错
汉化:好像这个版本没有汉化,要用旧版本的汉化包,暂时先用英文版
配置
其他配置请看别人的帖子
用tab缩进:https://blog.csdn.net/weixin_41656968/article/details/80295282
关于添加jedi插件

虽然Network Status是online,但不知为何什么也update不出来,尝试过取消preferences->network的dynamic online status determination也不行(此贴6楼,解决的是Network Status offline的情况)
浏览器访问https://eric-ide.python-projects.org/plugins6/repository.xml会自动转跳到
https://.../plugins7/repository.xml,这里并没有Jedi,但是有其他插件
尝试手动添加插件
参考这篇,plugin6/repository.xml下关于jedi的描述是这样的
<Name>Completions, Jedi</Name>
<Short>
Alternative code completion provider using the Jedi library.
</Short>
<Description>
This plug-in provides an alternative code completion, calltips and documentation provider. It includes the capability to jump to the place a name is defined through a configurable mouse click combination. The information is determined by the Jedi library.
</Description>
我在plugin7/repository.xml下找到类似的描述

在浏览器访问https://eric-ide.python-projects.org/plugins7/stable/PluginAssistantEric.zip 下载PluginAssistantEric.zip
按照参考文,将zip放到(这步不做也行)




可是restart后查看插件状态是红名

先不管了
改配色 改字体
用惯了sublime的mariana风格,对白色背景的ide表示很痛苦
参考https://blog.csdn.net/u014041346/article/details/83030750
preferences->interface->interface->Styel: Fusion
preferences->interface->interface->Styel Sheet: Chinese_Dark.qss

preferences->Editor->Style->Font 全都用Consolas 字体

preferences->Editor->Highlighters->Styles->laxer language: python3 -> import styles
eric6预置提供的两个.e4h都不好看,我按照在sublime常用的mariana风格进行了一些设置,导出了一个.e6h文件
按需自取:https://pan.baidu.com/s/1nOmEoAanPiBfD-aJecbXsA
提取码:kpn9

最终

使用(找到Qt designer)
Eric使用操作
Project建立:Eric菜单栏——Project——New(新增项目或其它)——New Forms:
Eric界面,点击Forms图标(工具栏Eric绿色小莽蛇图标),在下边空白处右键——New Forms:
new forms后有生成文件,但是报错could not start qt-designer


\pyqt5_tools下并没有designer.exe,只有下列文件

网上的答案大多是pip install PyQt5-tools,并不管用
在知乎找到了一个2020年的答案
pyqt5-tools安装之后这个文件夹只有一些杂七杂八的东西
site-packages里搜索designer.exe会在pyqt5_application里面有一个但是不能用,
pip install pyqt5designer解决了,pyqt5designer这个文件夹下直接有
作者:寄夏予你

site-packages中多出两个文件夹

QtDesigner里有designer.exe
修改eric的qt tools路径

此时再new form或者双击ui文件就能打开Qt designer了
常用快捷键:https://blog.csdn.net/qq_36321889/article/details/85332677
比较实用的:
Alt+Shift+空格:从API or Document中补充(推荐使用,在写PyQt时比较实用)
Ctrl+Y:恢复到上次保存的状态
Ctrl+I:缩进 Ctrl+Shift+I:取消缩进 。不设置tab缩进就可以缩进了
Ctrl+M:注释一行 Ctrl+Alt+M:取消注释
Ctrl+Shift+M:toggle注释,意思是注释状态下按此键取消注释,非注释状态下按此键注释
Ctrl+R:替换 有时候要替换一大段落里的十几个变量时,eric不像sublime能ctrl+d快速选中相同单位,这时用ctrl+R就能快速替换
Ctrl+E:选中一个括号里的所有内容(包含括号)
ctrl+M 如果已选中多行,则会全部都在行的开头 加注释符。(如果没有,请开perferences->editor->general->comment->insert comment at column 0