问题描述
以非管理员用户身份安装 Kivy.当我运行一个基本的 hello World 时,我得到找不到 Python.exe 入口点",其中包含以下详细信息:
<块引用>程序入口点 inflateRest2 无法位于 dll ....python2.7sharedsdl2inlibpng16-16.dll".
当我点击 OK 时,什么都没有加载.
谷歌搜索后,我添加了以下两条语句:
导入操作系统os.environ['KIVY_IMAGE'] = 'pil,sdl2'
现在当我运行它时,它仍然显示入口点错误,但显示如下所示的输出:
如何解决入口点问题?
谢谢.
你可以用这段代码找到另一个dll
import ctypes.utilctypes.util.find_library("zlib1.dll")
<块引用>
所以我找到了原因.英特尔在 C:Program FilesIntelWiFiin 中引入了他们自己的 zlib1.dll,并将此目录添加到 PATH.因此,每当与 zlib 链接的应用程序尝试在 PATH 中没有 C:msys64mingw64in 的情况下执行时,它都会尝试加载不包含该方法的不同版本的 zlib.真正的解决方案是戳入英特尔并告诉他们停止做愚蠢的事情,比如用他们自己的东西来困扰系统范围的 PATH,但无论如何.只需将您的 mingw64 zlib1.dll 复制到您的应用目录中即可.
https://github.com/msys2/MINGW-packages/issues/813
Installed Kivy as non-admin user. When I run a basic hello World I get "Python.exe Entry Point not found" with these details:
The procedure entry point inflateRest2 could not be located in the dll ....python2.7sharedsdl2inlibpng16-16.dll".
When I hit okay then nothing loads.
After googling I added these 2 statements:
import os
os.environ['KIVY_IMAGE'] = 'pil,sdl2'
and now when I run this it still shows the entry point error but shows the output as seen here:
How to fix the entry point issue?
Thanks.
You can use this code to find another 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 FilesIntelWiFiin and they add this directory to PATH. So whenever an app linked against zlib tries to execute without C:msys64mingw64in 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
这篇关于Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!