Pyinstaller distributing opencv from Windows 10 to Windows <10, missing ucrt dlls api-ms-win-crt

前端 未结 3 2361
挽巷
挽巷 2021-02-20 08:41

I have a Python 3.5 64 bit program (required by tensorflow for Windows) that uses OpenCV. I am distributing it with pyinstaller.

I built my program with Windows 10

3条回答
  •  情深已故
    2021-02-20 09:32

    If you would have provided your spec file I'd could see what's going on. From here its likely your not including files.

    There is two methods to go from here:

    1. Create "one" single file that includes all dll's, pyd files and more... a large exe-file as result.
    2. The other way is to have it as file + folder filled with dll files, etc... you get a small exe-file.

    Check add binary (incl. dll) files here the pyinstaller documentation about including files manually.

    Check add data files here the pyinstaller documentation about including files manually.

    An example spec-file that includes dll files from your dll folder.

    block_cipher = None a = Analysis(['minimal.py'], pathex = ['/Developer/PItests/minimal'], binaries = [ ( 'C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs', '.' ) ], datas = [ ('helpmod/help_data.txt', 'helpmod' ) ], hiddenimports = [], hookspath = None, runtime_hooks = None, excludes = None, cipher = block_cipher) pyz = PYZ(a.pure, a.zipped_data, cipher = block_cipher) exe = EXE(pyz,... ) coll = COLLECT(...)

提交回复
热议问题