Home Ask Login Register

Developers Planet

Your answer is one click away!

Mansoor Ahmad February 2016

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:

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.

IDE: Sublime Text 3

P.S. I added Python to PATH variable


L.S. February 2016

The module named 'codecs' could not be found in the module library of your python installation.

Please make sure you installed the right pygame installer for your python version into the right folder.

Note: Pygame initially was only supported for python2.7, double check if you are using a python3.4 compatible version. 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.

Post Status

Asked in February 2016
Viewed 3,239 times
Voted 9
Answered 1 times


Leave an answer

Quote of the day: live life