简体   繁体   English

找不到PyInstaller lib

[英]PyInstaller lib not found

I made a simple python[3.5.2] program using tkinter. 我使用tkinter制作了一个简单的python [3.5.2]程序。 When I use pyinstaller[3.2] on it it gives me a ton of 'lib not found' warnings. 当我在它上面使用pyinstaller [3.2]时,它给了我大量的“lib not found”警告。 Example: 例:

2999 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\\python\\python.exe 2999警告:未找到lib:c:\\ python \\ python.exe的api-ms-win-crt-runtime-l1-1-0.dll依赖项

3031 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\\python\\python.exe 3031警告:未找到lib:c:\\ python \\ python.exe的api-ms-win-crt-heap-l1-1-0.dll依赖项

3218 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\\python\\VCRUNTIME140.dll 3218警告:找不到lib:c:\\ python \\ VCRUNTIME140.dll的api-ms-win-crt-runtime-l1-1-0.dll依赖项

3312 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\\python\\VCRUNTIME140.dll 3312警告:找不到lib:c:\\ python \\ VCRUNTIME140.dll的api-ms-win-crt-convert-l1-1-0.dll依赖项

6494 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\\python\\DLLs_hashlib.pyd 6494警告:找不到lib:c:\\ python \\ DLLs_hashlib.pyd的api-ms-win-crt-heap-l1-1-0.dll依赖项

7271 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\\python\\DLLs\\unicodedata.pyd 7271警告:未找到lib:c:\\ python \\ DLLs \\ unicodedata.pyd的api-ms-win-crt-stdio-l1-1-0.dll依赖项

.bat file I use to make executables is 我用来制作可执行文件的.bat文件

@echo off @echo关闭

set /p file_name="Enter file name: " set / p file_name =“输入文件名:”

pyinstaller %0..\\%file_name%\\%file_name%.py --onefile --windowed --distpath %0..\\%file_name% --name=%file_name% pyinstaller%0 .. \\%file_name%\\%file_name%.py --onefile --windowed --distpath%0 .. \\%file_name%--name =%file_name%

del %file_name%.spec del%file_name%.spec

rmdir /s /q build rmdir / s / q build

echo. 回声。

pause 暂停

What am I doing wrong? 我究竟做错了什么? Windows 10 64bit Windows 10 64位

Just had this problem myself. 我自己就是这个问题。 The problem is that pyinstaller is not fully compatible Windows 10. The only solution currently is to download the Windows 10 SDK (a 2GB download). 问题是pyinstaller与Windows 10不完全兼容。目前唯一的解决方案是下载Windows 10 SDK(2GB下载)。

See more here: https://github.com/pyinstaller/pyinstaller/issues/1566 在此处查看更多信息: https//github.com/pyinstaller/pyinstaller/issues/1566

I answered a question with a similar solution here: https://stackoverflow.com/a/56942695/10951987 我在这里用类似的解决方案回答了一个问题: https//stackoverflow.com/a/56942695/10951987

When there is a whole slew of WARNINGS coming from pyinstaller about not being able to locate Windows DLLs, you might check to see if they're in one of the two following locations: 当来自pyinstaller的大量WARNINGS无法找到Windows DLL时,您可能会检查它们是否位于以下两个位置之一:

C:\Windows\System32\downlevel
C:\Windows\SysWOW64\downlevel

You can add one or both to the PATH variable, like so and those warnings should disappear: 您可以将一个或两个添加到PATH变量,就像这样,这些警告应该消失:

set PATH=%PATH%;C:\Windows\System32\downlevel

I noticed some of the DLLs you're unable to locate are in the folders I called out above. 我注意到你无法找到的一些DLL在我上面提到的文件夹中。

Note: this will work for any DLLs that you can track down on your machine. 注意:这适用于您可以在计算机上跟踪的任何DLL。 Add that directory to PATH so that pyinstaller can find them. 将该目录添加到PATH,以便pyinstaller可以找到它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM