Python 3.7.9 可用的EasyOCR环境相关模块的版本

这是一个Python 3.7.9可用的EasyOCR环境相关模块的版本

requirements.txt

altgraph==0.17.4
certifi==2025.10.5
charset-normalizer==3.4.4
easyocr==1.4.1
greenlet==2.0.2
idna==3.10
imageio==2.9.0
importlib-metadata==6.7.0
MouseInfo==0.1.3
networkx==2.6.3
ninja==1.11.1.4
numpy==1.21.6
opencv-python-headless==4.12.0.88
packaging==24.0
pefile==2024.8.26
Pillow==8.2.0
playwright==1.35.0
PyAutoGUI==0.9.54
pyclipper==1.3.0.post6
pyee==9.0.4
PyGetWindow==0.0.9
pyinstaller==5.13.2
pyinstaller-hooks-contrib==2024.7
PyMsgBox==2.0.1
pyperclip==1.11.0
PyRect==0.2.0
#PyScreeze==1.0.1
pyscreeze==0.1.28
python-bidi==0.6.2
pytweening==1.2.0
PyWavelets==1.3.0
#pywin32==308   #在windows server 2016上死活不行
pywin32==304
pywin32-ctypes==0.2.3
PyYAML==6.0.1
requests==2.31.0
scikit-image==0.19.3
scipy==1.7.3
shapely==2.0.7
tifffile==2021.11.2
#torch==1.11.0+cpu
#torchaudio==0.11.0+cpu
#torchvision==0.12.0+cpu
typing_extensions==4.7.1
urllib3==2.0.7
zipp==3.15.0

以上的requirements.txt还包括了操作鼠标、键盘的模块,还有图片裁剪,这些不是easyOCR需要的,我这个环境的用于编写一个程序,需要用到win32gui。

如果是内网的话,pip需要设置代理,为了加快速度,可以使用国内的清华源。windows代理的话可以安装一个试用版的ccproxy 8.0,为了测试代理,可以用telnet,或者curl,或者浏览器安装插件Proxy SwitchyOmega 2.5.21来测试代理,使用代理的话,如果使用socks代理,需要pip先下载一个可直接安装的PySocks-1.7.1-py3-none-any.whl,进行离线安装。然后激活 .venv 环境(如果有这种环境的话),然后设置2个变量HTTP_PROXY,HTTPS_PROXY,windows用set命令设置。

浏览器代理先不管,主要是pip代理能设置好,浏览器代理是容易设置的。

如果不是内网的话,就不使用代理,就更简单了。

SOCKS 代理

(.venv) c:\code\python\WeChat>pip install d:\PySocks-1.7.1-py3-none-any.whl
Processing d:\pysocks-1.7.1-py3-none-any.whl
Installing collected packages: PySocks
Successfully installed PySocks-1.7.1

成功

c:\code\python\wechat.venv\scripts\python.exe -m pip install --upgrade pip --proxy socks5h://110.xx.xx.xx:1080 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install setuptools wheel build --upgrade --proxy socks5h://110.xx.xx.xx:1080 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

pip install -r requirements.txt --proxy socks5h://110.xx.xx.xx:1080 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install MouseInfo==0.1.3 --index-url https://pypi.org/simple/ --proxy socks5h://110.xx.xx.xx:1080

pip install PyAutoGUI==0.9.54 --index-url https://pypi.org/simple/ --proxy socks5h://110.xx.xx.xx:1080

pip install pillow mouseinfo pygetwindow pymsgbox pyscreeze -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn --proxy socks5h://110.xx.xx.xx:1080

对于 SOCKS 代理,可尝试设为:

windows 全局变量
HTTP_PROXY=socks5h://110.xx.xx.xx:1080
HTTPS_PROXY=socks5h://110.xx.xx.xx:1080
但前提是已安装 PySocks,否则无效!

【会话变量】
set HTTP_PROXY=socks5h://110.xx.xx.xx:1080
set HTTPS_PROXY=socks5h://110.xx.xx.xx:1080

综合建议操作流程
步骤 1:确认 Python 版本 ≥ 3.7
python --version # 应 >= 3.7,推荐 3.8~3.10

步骤 2:单独安装 PyTorch(带 +cpu)
pip install torch1.11.0+cpu torchvision0.12.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html

步骤 3:安装其他依赖(排除 torch)
编辑 requirements.txt,临时注释掉 torch 相关行:

#torch1.11.0+cpu
#torchvision
0.12.0+cpu
tifffile==2021.11.2

然后运行:
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

playwright install chromium --proxy socks5h://110.xx.xx.xx:1080

2025-11-07

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值