Skip to content

Commit 1fd5242

Browse files
fix: 添加pyinstaller隐藏导入解决运行时错误
- 添加jaraco.text, jaraco.functools, jaraco.context - 解决ModuleNotFoundError: No module named 'jaraco'
1 parent eb78bb8 commit 1fd5242

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

vehicle-mock/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ RUN pip3 install --no-cache-dir pyinstaller==6.8.0 \
4545
WORKDIR /workspace/app
4646

4747

48-
RUN pyinstaller --clean -F -s --paths=src mockprovider.py
48+
RUN pyinstaller --clean -F -s --paths=src \
49+
--hidden-import jaraco.text \
50+
--hidden-import jaraco.functools \
51+
--hidden-import jaraco.context \
52+
mockprovider.py
4953

5054
WORKDIR /workspace/app/dist
5155

0 commit comments

Comments
 (0)