0

I've installed SageTex in my texmf tree. Latex is running using WinEdt and appears to see the style file, as I have the output files example.sagetex.sage from example.tex. My issue is the second step to have this compile with Sage.
I have the following message:

 NameError                                 Traceback (most recent call last)
 <ipython-input-2-88e1aeb809a1> in <module>()
 ----> 1 example.sagetex.sage

 NameError: name 'example' is not defined

I am running Python 3.7 - I'm not sure whether this would be an issue. Is anyone able to shed any light on what is going on?

  • That could be the problem. The website says: "Work in progress aims to allow usage of Python 3 in the not-so-far future. Until this task is completed, SageMath will continue to use Python 2.x.". The easiest way to get up and running with sagetex is a free Cocalc account. – DJP Mar 11 '19 at 13:18
  • Ok WinEdt says Windows ? This makes it a big problem to track down I spent weeks on getting some grasp of the many places this can go wrong lets see if any has paid off. I seem to recollect 2.7 is preferred as some of the py has not been fully converted but lets not worry about that yet. There are many ways to route from the editor through the numerous layers of skin to access Sage Math so what variant of sage is Which SageTeX trying to access. In your question give as much info about SageTeX source. It should be from SAGEMATH itself (Avoid loading package in MiKTeX except for documentation) – user170109 Mar 11 '19 at 13:19
  • I checked the AskSagemath site for a similar problem. It could be related to how you ran Sage. The question here got a similar error when they used runfile rather than load. – DJP Mar 11 '19 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.