I think the version you tried to compile is different than the one posted above. In the error message, you can see the line sage.all.mod(sage.mod(y,n)**2+1,n)**2+1 which includes sage.mod which doesn't appear anywhere in the version you posted.
When I try to compile the exp.spyx file posted above, then everything works fine for me. Try that and let me know how it goes.