1 just started using pyinstaller-f ship_detect.py packing paper
File "site-packages\osgeo\__init__.py", line 17, in swig_import_helperImportError: No module named ‘_gdal‘
The solution to this error is not to use-f direct Pyinstaller ship_detect.py and then find Osgeo._gdal in dist to rename it to _gdal, then this error solved
2 But another error was reported. Modulenotfounderror:no module named ' Pandas._libs.tslibs.np_datetime '
Just started trying to modify the Hooks folder inside the Pyinstaller directory to add hook_pandas.py script content: Hiddenimports =[' pandas._libs.tslibs.np_datetime ', ' pandas._ Libs.tslibs.nattype ', ' pandas._libs.skiplist ']
But finish one after another finally use Pyinstaller--hidden-import pandas ship_detect.py Solve
3 and then reported missing mxnet DLL library
Runtimeerror:cannot Find the MXNet library.
List of candidates:
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\libmxnet.dll
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\. /.. /lib/libmxnet.dll
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\. /.. /build/libmxnet.dll
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\. /.. /build\libmxnet.dll
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\. /.. /build\release\libmxnet.dll
F:\YOLO\YOLO_pro\install\yoloV2\dist\ship_detect\mxnet\. /.. /windows/x64\release\libmxnet.dll
[1088] Failed to execute script ship_detect
The workaround is to create a folder in Dist mxnet then no matter the 3,721 simple rude mxnet inside the dill are copied to the folder.
The final program runs smoothly.
Pyinstaller Packaging Error Summary contains gdal pandas mxnet dll and other issues of resolution