Pygame installed on windows, getting "pygame.error: Failed loading libwebp-7.dll" when trying to call pygame.image.load()
Pygame installed on windows, getting "pygame.error: Failed loading libwebp-7.dll" when trying to call pygame.image.load()
我在 windows 10 机器上安装了 python 3.9.1 运行ning。我通过 pip
在我的机器上安装了 pygame 2.0.1
(python -m pip install https://github.com/pygame/pygame/releases/download/2.0.1/pygame-2.0.1-cp39-cp39-win_amd64.whl
)
但是在调用 pygame.image.load("file.png")
时出现错误:
pygame.error: Failed loading libwebp-7.dll: The specified module could not be found.
我试过通过 pip install pygame
安装
并且 运行 在 pygame.tests
中进行了测试,但它们 运行 没问题。
我设法通过使用 whl 文件修复了这个错误
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
而不是来自 github 版本。
我不确定为什么会这样,但我希望遇到此问题的任何其他人都能得到帮助。
我在 windows 10 机器上安装了 python 3.9.1 运行ning。我通过 pip
在我的机器上安装了 pygame 2.0.1(python -m pip install https://github.com/pygame/pygame/releases/download/2.0.1/pygame-2.0.1-cp39-cp39-win_amd64.whl
)
但是在调用 pygame.image.load("file.png")
时出现错误:
pygame.error: Failed loading libwebp-7.dll: The specified module could not be found.
我试过通过 pip install pygame
安装
并且 运行 在 pygame.tests
中进行了测试,但它们 运行 没问题。
我设法通过使用 whl 文件修复了这个错误 https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame 而不是来自 github 版本。 我不确定为什么会这样,但我希望遇到此问题的任何其他人都能得到帮助。