Skip to content
yesRabbit edited this page Sep 15, 2022 · 8 revisions

我的 Python 路径在哪?

通过终端命令where python3查询,如果您使用 Homebrew 默认配置安装,那么路径应该为/usr/local/bin/python3

启用 CNOCR 的 FastAPI 服务模式 (Windows)

  1. 修改 config.pyCNOCR_SERVE = 1
  2. 编写启动脚本
# start.bat

set root=C:\Users\XX\anaconda3

call %root%\Scripts\activate.bat %root%

call conda activate ocr

call cnocr serve -p 8501
  1. 下载 NSSM ( http://nssm.cc/builds ),进入 NSSM 所在文件夹,以管理员模式启动 CMD,输入 ./nssm.exe install CNOCR_API

  2. 选择 start.bat 文件,并安装服务。

image

Clone this wiki locally