环境:python3.6.8
系统:ubuntu18.04
在pyinstaller的hook目录下(python根目录/lib/python3.6/site-packages/PyInstaller/hooks),创建以下两个文件:
# hook-paddle.py from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("paddle") # hook-paddlehub.py from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("paddlehub")解决进程无线启动问题
修改源码 python根目录/lib/python3.6/site-packages/paddle/dataset/image.py
当出现报错importError: libmklml_intel.so: cannot open shared object file: No such file or directory时,解决方法:安装mkl
pyinstaller打包命令pyinstaller --exclude matplotlib --hidden-import six --hidden-import requests --hidden-import shapely --hidden-import pyclipper --add-binary "python根目录/lib/python3.6/site-packages/paddle/libs:." -p "/python根目录/lib/python3.6/site-packages" --clean -c -F server.py
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)