problem with different version of python on same platform

This is the place for queries that don't fit in any of the other categories.

problem with different version of python on same platform

Postby ayaan » Sat Jan 04, 2014 8:37 am

first i install python 3.3 on my pc (OS : Windows 7 32bit) and then i install python 2.7 on the same platform.
Now python 2.7 works fine but python 3.3 gives the following error.
Code: Select all
C:\Python33>python
Fatal Python error: Py_Initialize: unable to load the file system codec
    File "C:\Python27\lib\encodings\__init__.py", line 123
        raise CodecRegistryError,\
                                             ^
SyntaxError: invalid syntax

C:\Python33>
ayaan
 
Posts: 3
Joined: Fri Jan 03, 2014 8:17 am

Re: problem with different version of python on same platfor

Postby snippsat » Sat Jan 04, 2014 1:47 pm

Problem is a misconfigured environment variable.
http://bugs.python.org/issue17658

Always set environment variable to the Python version you what to use.
This mean that easy_install or pip will install module to that version.
And of course starting python from anywhere from cmd will start that version.
Or use a IDE like Pyscripter that can start all version of Python independently.
User avatar
snippsat
 
Posts: 184
Joined: Thu Feb 21, 2013 12:04 am


Return to General Coding Help

Who is online

Users browsing this forum: buran, W3C [Linkcheck] and 4 guests