To fix this properly you can do the following.
Firstly put back the Zeus PyLib folder which will break the compiler option.
Now for some further information on how the compile works.
To compile (syntax check) a Python file from inside Zeus this
zpython.cmd batch file (found in the Zeus install folder) is used:
Code: Select all
@echo off
REM Move to the file's directory
cd %2
REM Remove the double quotes from the file name argument
set file_name=%1
set file_name=%file_name:"=%
REM Run a syntax check on the file provided
call pythonc.exe -c "compile(open('%file_name%').read(), '%file_name%', 'exec')"
This batch file is run via the
Compiler options found in the
Python document type using this command line:
The "$f" and "$fdd" above equate to the file name and file drive directory of the currently active file and are passed to the batch file as arguments.
You will notice that the
pythonc.exe is being used to compile the file. This executable is nothing more than the Python 2.7.2 version that comes with Zeus.
In your case you want to run the latest
Python 3.x so just change the batch file to use the correct Python version as follows:
Code: Select all
call C:\Python33\python.exe -c "compile(open('%file_name%').read(), '%file_name%', 'exec')"
And make sure the Python Compiler command line is set to this:
But after doing this when you compile a file you will get the same error that you reported earlier:
Code: Select all
Fatal Python error: Py_Initialize: unable to load the file system codec
File "C:\Users\Jack\AppData\Roaming\Xidicone\Zeus\zScript\PyLib\encodings\__init__.py", line 123
raise CodecRegistryError,\
^
SyntaxError: invalid syntax
This is because Zeus has set the
PYTHONPATH environment variable to point to this folder:
Code: Select all
C:\Users\Jack\AppData\Roaming\Xidicone\Zeus\zScript\PyLib\
But this folder contains the 2.72 version of the library not the required 3.3 version.
To fix this just set the PYTHONPATH environment variable by hand as follows:
- Start Run, Control Panel menu
- System, Advance System Settings
- Environment Variables
Add the environment PYTHONPATH variable with a value of:
Now if you restart Zeus and recompile the file, this time the Python executable will find the correct version of the library files
Cheers Jussi