All of those should have /usr/bin prepended to make sure we're getting the *right* python. Odds are this same bug is in all python versions (or, at least, all python3 versions), given they likely share common packaging, as evidenced by the magic @PVER@ substitution.
The problem here is that python's postinst scripts call python without a qualified path:
(base)adconrad@ nosferatu: ~/py/python3. 5-3.5.3$ rgrep '@PVER@ -E' libPVER- testsuite. postinst. in: @PVER@ -E -S /usr/lib/ @PVER@/ py_compile. py $files libPVER- testsuite. postinst. in: @PVER@ -E -S -O /usr/lib/ @PVER@/ py_compile. py $files PVER-dbg. postinst. in: @PVER@ -E -S /usr/lib/ @PVER@/ py_compile. py $files PVER-dbg. postinst. in: @PVER@ -E -S -O /usr/lib/ @PVER@/ py_compile. py $files PVER-venv. postinst. in: @PVER@ -E -S /usr/lib/ @PVER@/ py_compile. py $files PVER-venv. postinst. in: @PVER@ -E -S -O /usr/lib/ @PVER@/ py_compile. py $files PVER-minimal. postinst. in: @PVER@ -E -S /usr/lib/ @PVER@/ py_compile. py $files PVER-minimal. postinst. in: @PVER@ -E -S -O /usr/lib/ @PVER@/ py_compile. py $files PVER.postinst. in: @PVER@ -E -S /usr/lib/ @PVER@/ py_compile. py $files PVER.postinst. in: @PVER@ -E -S -O /usr/lib/ @PVER@/ py_compile. py $files
debian/
debian/
debian/
debian/
debian/
debian/
debian/
debian/
debian/
debian/
All of those should have /usr/bin prepended to make sure we're getting the *right* python. Odds are this same bug is in all python versions (or, at least, all python3 versions), given they likely share common packaging, as evidenced by the magic @PVER@ substitution.