I am trying to run Bibulous with Texmaker on Windows because I want to experiment with it, and I believe I am really close. Indeed, the only thing I cannot do is to tell Texmaker to run the Python file bibulous.py on the .aux file during my pdflatex bibtex pdflatex(x2) compilation loop: I get

Error : could not start the command : python.exe "C:\acertainpath\bibulous.py" "thesis".aux

Following the WinEdt/Texmaker examples, I replaced the BibteX command by python.exe "C:\acertainpath\bibulous.py" %.aux. But maybe that is not the way to do. I am not entirely familiar on how to run things in Python from Windows, nevertheless I made more experiments, and here are some hints:

  1. I have Python 3.5 installed, it is in the AppData folder. I added it to the PATH (as it was proposed during the install process). Now I can run python from the cmd.
    But then when I just try to run in the cmd python C:\acertainpath\bibulous.py I get line 1162 except Exception, err:. I tried to look in the file but couldn't figure out anything.
    I must add that if I run python C:\acertainpath\test.py with test.py containing print("Hello World!"), Python works, so I don't think the error comes from Python itself.

  2. So then I had the idea to run it with Cygwin that I have installed for other reasons. Well, it works with it!
    I can, by just putting the .aux files obtained from a pdflatex run in Texmaker, along with the mybst.bst template file, the .bib and the bibulous.py all in the Cygwin folder, and running python bibulous.py thesis.aux, get the output files necessary (the .bbland the *-extract.bib).
    If I put them back in C:\acertainpath where my thesis and bibulous.py were originally, running pdflatex(x2) gives me my pdf!
    I also want to say that if I run in Cygwin python bibulous.py(the equivalent of what I tried in point 1. in cmd), it works, and by that I mean Bibulous exectues and of course then fails because there is no .aux file, but it works.

So in the end I feel like it's the way I call it from Windows (and so also from Texmaker) that is at fault. Maybe I should do something else here?

  • The bibulous.py file is available here – viiv Nov 24 '16 at 1:43
  • I did a slight edit for clarity – viiv Nov 24 '16 at 10:20
  • Try it with python 2.7. Python 2 and python 3 have some differences. It wouldn't surprise me if cygwin had 2.7 (mine does). You can check by just typing python from your cygwin prompt. – Chris H Nov 25 '16 at 13:32
  • ... but your intial error may have an issue with quotes as well -- I'd expect "thesis.aux" or thesis.aux (or even just thesis or "thesis") – Chris H Nov 25 '16 at 13:33
  • Thanks a lot, it was a Python version problem, because with Python 2.7 it works! (it is also indeed the version Cygwin was using!) – viiv Nov 26 '16 at 22:17

Python versions are rather confusing. When "2.7 or greater" is specified, compatibility with 3.x isn't guaranteed, and is actually unlikely.

Cygwin currently includes 2.7 which is why it worked there, while most python distributions for Windows default to 3.5.

So the solution is probably to install python 2.7, though it may be installed already and just need to be configured.

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.