PyInstaller - ПРЕДУПРЕЖДЕНИЕ: lib не найдена: api-ms-win-crt*.dll

Я пытаюсь выполнить PyInstaller main.py на моем компьютере с Windows 10, я получаю следующее предупреждение:

3536 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe
3701 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe
3921 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe
4088 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe
4258 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe
4490 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\VCRUNTIME140.dll
4665 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\VCRUNTIME140.dll
4858 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\VCRUNTIME140.dll
5024 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\VCRUNTIME140.dll
5248 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\VCRUNTIME140.dll
5567 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
5727 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
5942 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6108 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6275 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6436 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6593 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6752 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
6922 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
7090 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
7249 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll
7417 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python36.dll

Я нашел мою DLL в следующем каталоге:C:\Program Files (x86)\Microsoft Visual Studio\Installer

Я прочитал следующую статью ( https://pyinstaller.readthedocs.io/en/stable/usage.html) и попытался создать.spec-файл, используя pyi-makespec main.py включить мои DLL. Вот как выглядит мой spec-файл:

# -*- mode: python -*-

block_cipher = None


a = Analysis(['main.py'],
             pathex=['C:\\Users\\dlee\\eclipse-workspace\\python_java_pyjnius_test'],
             binaries=[('C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer','.')],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='main',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='main')

Тем не менее, это дает мне ту же ошибку.

Я также попробовал следующую команду:pyinstaller --add-binary "C:\Program Files (x86)\Microsoft Visual Studio\Installer;." main.py

Это все еще не работает. В конце концов, после выполнения main.exe я всегда получаю следующий вывод:

Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries

Я действительно борюсь и действительно не уверен, что я сделал неправильно. Любая помощь будет оценена. Спасибо!

С наилучшими пожеланиями, Дэниел Ли

0 ответов

Другие вопросы по тегам