I've been using pygame 2.0.1
consistently for months. Today, after I upgraded to the latest version (2.1.2), I started getting this error when trying to load an audio file:
几个月来,我一直在使用pyGame 2.0.1。今天,我升级到最新版本(2.1.2)后,在尝试加载音频文件时开始出现以下错误:
'pygame.error: Failed loading libvorbisfile-3.dll: The specified module could not be found'.
Things I have tried so far:
到目前为止我尝试过的东西:
- Downloading the dll and copying it to
/site-packages/pygame
(it was already there).
- Downloading the dll and copying to the folder of the script being run
- Restarting the IDE
- Restarting Windows
- Reinstalling pygame
- Downgrading to pygame 2.0.1
I'm using Windows 10, Python 3.9.10 and running a virtualenv through PyCharm.
我使用的是Windows 10、Python3.9.10,并通过PyCharm运行了一个Virtualenv。
更多回答
优秀答案推荐
I solved the issue by uninstalling Python, installing the latest version (3.10.2), creating a new virtual environment, upgrading pip
to the latest version (21.2.4) and then installing pygame
via pip
.
我通过卸载Python、安装最新版本(3.10.2)、创建新的虚拟环境、将pip升级到最新版本(21.2.4),然后通过pip安装pyGame解决了这个问题。
更多回答
我是一名优秀的程序员,十分优秀!