Sfoglia il codice sorgente

新增打包移植的说明

mrh 1 anno fa
parent
commit
4a771f47de
1 ha cambiato i file con 37 aggiunte e 0 eliminazioni
  1. 37 0
      README.md

+ 37 - 0
README.md

@@ -97,6 +97,29 @@ For different use cases, we provide distinct methods to use our program:
 
 2. Double-click to run.
 
+```shell
+# 使用 setup.bat 是通过 python便携版安装库,便携版相比完整版会少一些 VC++ 依赖,导致错误:ImportError: DLL load failed while importing _extra: 找不到指定的模块
+# 通过conda 安装的 python 环境,看到搜索路径 right path:
+['J:\\code\\pdf2zh_fuck\\PDFMathTranslate', 
+ 'G:\\program\\micromamba\\envs\\pdf\\python312.zip', 
+ 'G:\\program\\micromamba\\envs\\pdf\\DLLs', 
+ 'G:\\program\\micromamba\\envs\\pdf\\Lib', 
+ 'G:\\program\\micromamba\\envs\\pdf', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\win32', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\win32\\lib', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\Pythonwin', 
+ 'G:\\program\\micromamba\\envs\\pdf\\Lib\\site-packages']
+# 通过便携版安装的 python 环境,搜索路径 wrong path:
+['J:\\code\\pdf2zh_fuck\\pdf2zh_dist', 
+ 'J:\\code\\pdf2zh_fuck\\pdf2zh_dist\\python312.zip', 
+ 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\win32', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\win32\\lib', 
+ 'C:\\Users\\mg\\AppData\\Roaming\\Python\\Python312\\site-packages\\Pythonwin', 
+ 'J:\\code\\pdf2zh_fuck\\pdf2zh_dist\\Lib\\site-packages']
+```
 </details>
 
 <details>
@@ -164,6 +187,20 @@ See [Zotero PDF2zh](https://github.com/guaguastandup/zotero-pdf2zh) for more det
 
 </details>
 
+<details open>
+  <summary>6. conda package</summary>
+
+```shell
+conda create -n pdf python==3.12 -y
+conda activate pdf
+conda pack -n pdf -o pdf.tar.gz
+tar -xzf pdf.tar.gz -C pdf2zh_env
+.\pdf2zh_env\Scripts\activate.bat
+pdf2zh exzample.pdf
+```
+
+</details>
+
 ### Unable to install?
 
 The present program needs an AI model(`wybxc/DocLayout-YOLO-DocStructBench-onnx`) before working and some users are not able to download due to network issues. If you have a problem with downloading this model, we provide a workaround using the following environment variable: