Description
I use this code:
\documentclass[11pt]{article}%
\usepackage{pythontex}
\usepackage{nopageno}
\begin{document}
\begin{pyconsole}
x = 987.27
x = x**2
\end{pyconsole}
The variable is $x=$ \pycon{x}
\end{document}
With the previous installation the output is:
It create some files:
and a file test1.pytxcode
.
With the new installation, I have this output:
no folder pythontex-files-test10
but a file test10.pytxcode
.
In the log from the compilation:
Package PythonTeX Warning: Non-existent console content on input line 8.
Package PythonTeX Warning: Missing autoprint content on input line 10.
The file test10.pytxcode
contains this:
=>PYTHONTEX#pycon#default#default#0#console#####5#
x = 987.27
x = x**2
=>PYTHONTEX#pycon#default#default#1#i#####10#
x
=>PYTHONTEX:SETTINGS#
version=0.18
outputdir=pythontex-files-test10
workingdir=.
workingdirset=false
gobble=none
rerun=default
hashdependencies=default
makestderr=false
stderrfilename=full
keeptemps=none
pyfuture=default
pyconfuture=none
pygments=true
pygglobal=:GLOBAL||
fvextfile=-1
pyconbanner=none
pyconfilename=stdin
depythontex=false
pygfamily=py|python3|
pygfamily=pycon|pycon|
pygfamily=sympy|python3|
pygfamily=sympycon|pycon|
pygfamily=pylab|python3|
pygfamily=pylabcon|pycon|
The command python3 -m pip list
in the terminal gives (among others):
Pygments 2.19.1
which python
python: aliased to python3
which python3
/usr/local/bin/python3
python --version
Python 3.13.3
pythontex
env: python: No such file or directory
Oh, strange... But:
which pythontex
/Library/TeX/texbin/pythontex
and I have all these files in TeXLive:
I use the IDE Texpad (renamed Texifier, https://www.texifier.com)
It use this script file:
#!/bin/bash
# Texpad build (.tpbuild) file to use PythonTeX within Texpad
# NB this is to demonstrate pythontex only, it would need alterations to support bibliographies, indices, etc.
pdflatex -synctex=1 "$TEXPAD_ROOTFILE"
pythontex "$TEXPAD_ROOTFILE_NO_EXT"
pdflatex -synctex=1 "$TEXPAD_ROOTFILE"
Edit
If I try in the terminal (on a new file test11.tex
):
pdflatex test11.tex
works (This is pdfTeX, Version 3.141592653-2.6-1.40.26
... Output written on test11.pdf (1 page, 32850 bytes). Transcript written on test11.log.
)
But:
pythontex test11
env: python: No such file or directory
Why? echo $PATH
gives:
/usr/local/bin: ... :/Library/Apple/usr/bin:/Library/TeX/texbin
I tryed this:
/Library/TeX/texbin/pythontex test11
env: python: No such file or directory
What happens?
I found these informations in a previous Terminal window (before reinstallation of Python):
pythontex --version
env: python: No such file or directory
python --version
zsh: command not found: python
python3 --version
Python 3.13.2
pythontex
env: python: No such file or directory
which python
python not found
sudo ln -sf /usr/local/bin/python3 /usr/local/bin/python
Password:
python
Python 3.13.2 (main, Feb 4 2025, 14:51:09) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
pythontex
/usr/local/texlive/2024/texmf-dist/scripts/pythontex/pythontex3.py:549: SyntaxWarning: invalid escape sequence '\s'
So after enter sudo ln -sf /usr/local/bin/python3 /usr/local/bin/python
it was working? Perhaps, I don't recall.
But is it safe to use sudo ln -sf /usr/local/bin/python3 /usr/local/bin/python
? I have reinstalled Python because (perhaps after enter this last command), my Python IDE don't anymore warned me about syntax error in the editing mode.
I'm afraid the (very old) Python2 -> Python3 transition was a disaster, with the introducing of "python3" command. But anyway, the transition is what it is, we cannot change anything.
But what need the end users (that don't know a lot about python installation, but only need to use it as a tool) to do?
Can anyone help me?