Skip to main content
 首页 » 编程设计

无法找到 Python kivy 入口点 inflateRest2 libpng16-16.dll

2025年05月04日6lyj

以非管理员用户身份安装 Kivy。 当我运行一个基本的 hello World 时,我得到“找不到 Python.exe 入口点”以及这些详细信息:

The procedure entry point inflateRest2 could not be located in the dll ....\python2.7\shared\sdl2\bin\libpng16-16.dll".

当我点击 okay 时,没有任何加载。

谷歌搜索后我添加了这两个语句:

import os 
os.environ['KIVY_IMAGE'] = 'pil,sdl2' 

现在,当我运行它时,它仍然显示入口点错误,但显示的输出如下所示:

如何解决入口点问题?

谢谢。

请您参考如下方法:

你可以使用这段代码找到另一个dll

import ctypes.util 
ctypes.util.find_library("zlib1.dll") 
 

So i found the cause. Intel brings in their own zlib1.dll in C:\Program Files\Intel\WiFi\bin\ and they add this directory to PATH. So whenever an app linked against zlib tries to execute without C:\msys64\mingw64\bin in PATH, it tries to load this different version of zlib, that doesn't contain the method. The real solution would be to poke into Intel and tell them to stop doing stupid things like plaguing system-wide PATH with their own things, but whatever. Just copy your mingw64 zlib1.dll into your app directory and call it a day.

https://github.com/msys2/MINGW-packages/issues/813