I recently installed pyxll and was trying to use it to display output on the excel sheet.

The main calculation function is parallelized using Parallel Python (PaPy) and it runs fine.I then tried to display this output onto excel by writing a macro (with decorator xl_macro) which calls this function and displays its output.

When the macro calls the function and tries to create a job server (in PaPy), it instead opens up another window of excel and then it freezes (and has to be killed).

I'm not familiar with PaPy to be honest, but I imagine what's happening is that it's trying to launch a child python process to run the job server and is using sys.executable to determine what command to use to run python.

Because pyxll is running in excel and not as its own python process, sys.executable will be excel.exe and not python.exe. PyXLL doesn't use python.exe at all, and so doesn't know where it is (it only uses the python dll).

Try setting sys.executable to the python.exe you want the child process to run as (full path, eg c:/python33/python.exe) before calling PaPy.