I have ubuntu 15.10 and sage 6.9 installed, and texlive/texmaker, and have been trying to get sagetex to work.

I followed the instructions in the reference manual, and first attempted the 3rd, and stated most advisable method of making sagetex.sty known to tex. And as advised I copied the sagtex.sty file into my home texmf directory, by way of , with appropriate substitutions.

When I tried to compile my tex document, the following error message was displayed in texmaker:

screenshot from texmaker

Not understanding why this did not work, I went back and attempted the second suggestion by defining the environmental variable , again with relevant substitutions, and again with same resulting error code in texmaker.

Now I watched a video where Dan Drake was giving a presentation in which after he ran tex over the document, then ran a command like and then sage ran on the document and when he reran tex the document was produced with appropriate evaluations by sage.
So in short I don't know what I don't know. Did I not properly make tex aware of which directory the sagetex.sty file is located in? Or am I not using sage correctly or something?

We don't use sage in school so I have no assistance in the matter, if I am making an obvious mistake, perhaps one could imagine why.


The following is the error message from sagetex;

!latex error: file 'sagetex.sty' not found. type x to quit or to proceed, or enter new name. (default extension:sty) enter file name:!emergency stop. ^^M

Also, there are no example.sagetex.sage file, or example.sagetex.sout files being produced.

  • 1
    Please copy the text of the error message for better readability and searchability. – Null Jan 13 '16 at 3:49
  • (off-topic) I download Sage 6.10.beta1 and turns out there are some bugs in sage.py. Perhaps you might want to test them in your working directory prior to any nontrivial installation. – Symbol 1 Jan 13 '16 at 4:07
  • 1
    @Null I have updated my question to include the error – user74091 Jan 13 '16 at 5:27
  • @user74091 Could you include a link to the video you are referring to? – Karlo Jun 15 '16 at 9:40

Placing file to TeX directory (local or main) is not enough for TeX system to find it. TeXLive makes a list of files (not directories) which it can use, so you must first refresh database by texhash command, if TeX directory needs superuser permissions, then sudo texhash, because it makes changes in the directory, overwriting list of files.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.