简体   繁体   English

FatalError,Py_Initialize

[英]FatalError, Py_Initialize

I am having this problem where i try and run Python 3.4 with the Pygame library, but I get an error that says: 我在尝试使用Pygame库运行Python 3.4时遇到了这个问题,但是出现一条错误消息:

Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "C:\Python34\Lib\encodings\__init__.py", line 31, in <module>
ImportError: No module named 'codecs'

I am kinda a basic Python writer so I have no idea what this means. 我是一个基本的Python作家,所以我不知道这意味着什么。

IDE: Sublime Text 3 IDE:Sublime Text 3

PS I added Python to PATH variable PS我将Python添加到PATH变量

The module named 'codecs' could not be found in the module library of your python installation. 在python安装的模块库中找不到名为“编解码器”的模块。

Please make sure you installed the right pygame installer for your python version into the right folder. 请确保您为正确的python版本安装了正确的pygame安装程序到正确的文件夹中。

Note: Pygame initially was only supported for python2.7, double check if you are using a python3.4 compatible version. 注意:Pygame最初仅受python2.7支持,请仔细检查是否使用的是python3.4兼容版本。 Often these type of errors occour when 2.7 modules are expected that were renamed or no longer existant in 3 or you are trying to use code written in 2.7 with 3. 通常,当预期2.7个模块在3中被重命名或不再存在时,或者您尝试将2.7中编写的代码与3一起使用时,会发生此类错误。

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

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