1

I have been trying to install pythontex on Windows 8 (64-bit) with MiKTeX installed.

  • I have tried running "latex pythontex.ins" from the directory but it doesn't work.
  • I have tried using the package manager but pythontex is not there.
  • I have tried running "tlpkg install pythontex" but it seems its not installed.
  • I have tried running "python pythontex_install_texlive.py" from the directory but it complains that it cannot find TEXMF.

Please Help :(

Jesse
  • 29,686
  • Are you using the latest version of the install script? An earlier version had a bug that prevented it from requesting manual entry of a path, in the event that TEXMF cannot be found. Also, does kpsewhich -var-value=TEXMFDIST work for you on the command line? – G. Poore Dec 01 '13 at 05:02
  • Here is a screenshot it that helps http://i.imgur.com/iTWPdC3.jpg – sourcevault Dec 01 '13 at 06:34
  • hi G.Poore, Firstly Thanks for creating pythontex :) and i was thinking of sending u an email. I used the version available on github. – sourcevault Dec 01 '13 at 07:54
  • running kpsewhich -var-value=TEXMFDIST returns c:\Program Files\MiKeTeX 2.9 – sourcevault Dec 01 '13 at 07:55
  • Have you tried manually entering a path after you get to that step in the install script? If you don't already have a directory for manually installing packages, you could take a look at http://tex.stackexchange.com/questions/2063/how-can-i-manually-install-a-package-on-miktex-windows. – G. Poore Dec 01 '13 at 14:38
  • So i followed the link and made a TDS and ran your script again and it ran successfully ! however as you can see latex still doesnt identify pythontex [IMG]http://i.imgur.com/XNP3gCh.jpg[/IMG] – sourcevault Dec 02 '13 at 00:13
  • Your package manager is showing the python package, which is different from pythontex. You may need to tell your package manager to update its database (or run mktexlsr on the command line). Once that is done, I would expect things to work. Keep in mind that compiling will be a three-step process: run LaTeX, run pythontex <file>, run LaTeX again. If your C:\textmf\bin isn't on your PATH, you will need to add it so that pythontex.exe can be found (pythontex.exe should have been created in that location). – G. Poore Dec 02 '13 at 01:16
  • Yeah, your documentation is really clear about how to use pythontex, however getting it up and running is whats posing some difficulty :(. I couldnt find pythontex.exe in the bin folder so i ran your script again, apparently i need something called as runscript.exe http://i.imgur.com/yDwVkqH.jpg – sourcevault Dec 02 '13 at 01:52
  • I ran mktexlsr, and also updated the package manager using the GUI. no luck :( – sourcevault Dec 02 '13 at 02:08
  • runscript.exe is for TeX Live, so you may not have it. (If you did, it might be somewhere under c:\Program Files\MiKeTeX 2.9, probably in a bin directory.) You could take the sample pythontex.bat and edit it so that it has the right path to pythontex.py, then put it in the bin directory. – G. Poore Dec 02 '13 at 02:31
  • I also did what the error message says. but it cannot find the correct script file http://i.imgur.com/6arwLv7.png. Should i copy the .bat file into the script directory or should i copy the scripts it needs into the bin directory ? – sourcevault Dec 02 '13 at 02:35
  • Its trivial to copy the files i needs and change the windows PATH variable. – sourcevault Dec 02 '13 at 02:39
  • http://i.imgur.com/PltBpTB.jpg I edited the bat file and now pythontex works from the cmd. it still doesnt show up in the package manager but are you sure that this is fine ? can i just pass in the .tex file into pythontex from cmd or bash and things will work, without latex not registering it in the package manager :( – sourcevault Dec 02 '13 at 02:48
  • http://i.imgur.com/KgTH19B.jpg I think i am really close ! latex recognizes pythontex.sty also i am able to run pythontex from the cmd on <file>.tex however no .dvi is produced. The thing is i usually dont use .dvi i prefer directly outputing to pdf using pdflatex. Can i run pdflatex instead of latex. – sourcevault Dec 02 '13 at 03:20
  • also the way to use pythontex is
    • latex <filename>.tex
    • pythontex <filename>.tex
    • latex <filename>.tex

    am i correct ?

    – sourcevault Dec 02 '13 at 03:22
  • http://i.imgur.com/BLG453b.jpg Also PythonTexis complaining. It just hello world :( – sourcevault Dec 02 '13 at 03:53
  • pdflatex is fine...it's what I usually use. You are getting an error because by default PythonTeX imports the print() function from __future__. If you don't want that, then \usepackage[pyfuture=none]{pythontex} – G. Poore Dec 02 '13 at 04:16
  • Yes It finally Works !! :D – sourcevault Dec 02 '13 at 04:55

0 Answers0