0

I've install portable WinPython (python-3.6.0b4.amd64 from http://winpython.github.io/). I use Miktex and TexStudio as IDE. I'm compiling the example(pythontex_gallery.tex) of the pythonTeX package, It doesn't work for me in Win10. Path to python is in path variable

When I try to run pythontex fromwithin TexStudio (pythontex.exe --interpreter "python:py -3" %.tex) or via command line after tex-file compiling I get

Traceback (most recent call last): File "d:\Programs\LaTeX\MikTex\scripts\pythontex\pythontex.py", line 55, in <module> import pythontex3 as pythontex ModuleNotFoundError: No module named 'pythontex3'

but pythontex3.py in the same folder as pythontex.py

1

It seems that you should set your PYTHONPATH environment variable. I don't know Winpython, but the documentation (https://github.com/winpython/winpython/wiki/Environment) suggests you can do this by editing the file settings\winpython.ini in your winpython install dir. You should modify it so it contains a line like PYTHONPATH = D:\Programs\LaTeX\MikTex\scripts\pythontex

I did not try it, but it should work this way!

  • Unfortunantly, it does not help me. I have added PYTHONPATH as you mention, but error is still there. – sergiokapone Dec 13 '16 at 14:00
0

I figured out what is the problem was. I used python-3.6.0b4.amd64 which is probably unstable. With WinPython's python-3.4.4.amd64 it even do not need in PYTHONPATH declaration, only system PATH variable one need to be set the path to the python distribution.

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.