Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可否升级到 python3.10,甚至是 3.11 #228

Closed
FlyInWind1 opened this issue Nov 20, 2023 · 5 comments
Closed

可否升级到 python3.10,甚至是 3.11 #228

FlyInWind1 opened this issue Nov 20, 2023 · 5 comments

Comments

@FlyInWind1
Copy link

我自己试了下 miniconda 的 3.10,相比于自带的 3.8,启动速度快了很多,体感很明显

@hiroi-sora
Copy link
Owner

hiroi-sora commented Nov 20, 2023

可否升级到3.10以上?

当然是可以的。请按下列步骤操作:

  1. 下载相应版本的Python embeddable package 包,解压放置到 UmiOCR-data/runtime 中。
    https://www.python.org/downloads/windows/

image

  1. Umi中有一些第三方库是绑定3.8的,你需要重新下载甚至编译它。已知需要更新的库有:

将上述库的文件(.whl解压后的文件夹)放置到 UmiOCR-data/site-packages 即可。

个人实测,3.11是可以使用的。


为什么本项目不使用高版本Python?

因为 3.8 是官方最后一个支持win7的版本。考虑到本项目有很多win7用户,故选用兼容性最好的版本作为发行包。

不过,开发者当然可以自己调整和定制本项目的运行环境。


使用高版本Python的提升明显吗?

固然,新版py的运行速度有很大的提升,但对本项目的效率可能帮助不大。

Umi-OCR内部实际上有三个运行环境:跑OCR的C++推理引擎,跑UI界面的qml引擎,及跑业务逻辑的python解释器。前两者(C++和qml)已经是同类项目中最高效的了,python只是作为它们之间的胶水。故py速度再快,也难以影响到OCR的速度或前端的流畅度。

启动速度更快可能是存在的,不过体感不明显。你可以试试~

@FlyInWind1
Copy link
Author

FlyInWind1 commented Nov 20, 2023

谢谢解答,既然是win7那就没办法了。想问一下另一个问题,python3.11的pySide2是在哪下的,我用3.11进行pip install pyside2,安装失败

@hiroi-sora
Copy link
Owner

hiroi-sora commented Nov 20, 2023

首先请仔细了解 构建项目 ,本项目导入第三方包一般不使用pip。

其次,3.8到3.11的pyside2应该是能通用的。我在3.11上测试,似乎当前版本的pyside2没有问题,不需要更换。

@FlyInWind1
Copy link
Author

了解了

@FlyInWind1
Copy link
Author

希望可以尝试一下 https:/adang1345/PythonWin7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants