Ask Your Question

Version Conflict within Sagetex

asked 2016-10-18 16:17:17 -0500

56phil gravatar image

updated 2017-01-10 15:23:28 -0500

FrédéricC gravatar image

Hello, I'm running the latest versions of Sage and MacTex under MacOS 10.12 (Sierra). I've copied the new texmf directory to my Library directory. As shown below, things aren't working so well. Any advice on getting SageTex to work again would be most welcome. Thank you.

sagetex.VersionError: versions of .sty and .py files do not match. Primes.sagetex.sage was generated by sagetex.sty version "2012/01/16 v2.3.3-69dcb0eb93de", but is being processed by version "2015/08/26 v3.0-92d9f7a". Please make sure that TeX is using the sagetex.sty from your current version of Sage;

edit retag flag offensive close merge delete


Wow, that is an old sty file. You may have to remove some old versions first - I assume you looked through the instructions for how to do this since your report indicates you used the texmf directory.

kcrisman gravatar imagekcrisman ( 2016-10-18 20:15:28 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2016-10-19 09:38:10 -0500

updated 2016-10-30 02:50:02 -0500

Resolving sagetex.VersionError

This section is added to my initial answer, after I just ran into the same problem.

I solved the problem following the instructions on this page:

although for me with Sage 7.4 the location of sagetex was not at


but at


I copied that sagetex folder from my Sage installation to


(you may need to create some of the intermediate folders).

After doing that, everything runs fine.

Background on TeXLive on Mac OS X / OS X / macOS

(This is my initial answer which just gives related information.)

Under OS X 10.11 El Capitan and macOS 10.12 Sierra, the MacTeX installer installs TeXLive in /Library/TeX/texbin, while up to OS X 10.10 Yosemite, it would live in /usr/texbin.

More info about that in

Do you still have a /usr/texbin directory?

At some point the TeXLive distribution shipped a copy of SageTeX.

Maybe you have an old TeX installation either via MacTeX or via Fink, Homebrew or MacPorts?

You could check your PATH (echo $PATH) and see if there is any place where a sagetex.sty might be found.

You could try texdoc sagetex to see if an old SageTeX documentation is found.

edit flag offensive delete link more


Whoah, good to know! Have we updated the SageTeX installation stuff in the doc to reflect this? That should be done ASAP.

kcrisman gravatar imagekcrisman ( 2016-10-19 14:35:13 -0500 )edit

Thanks for the update In which case I repeat my request to update doc (perhaps to mention both locations)...

kcrisman gravatar imagekcrisman ( 2016-10-31 07:55:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-10-18 16:17:17 -0500

Seen: 117 times

Last updated: Oct 30 '16