Package: python3-sphinx Version: 5.3.0-3 Severity: normal Dear Maintainer,
I used to install tensorflow with pip, and sphinx-build had no trouble building my documentation which includes `import tensorflow`. Since we are not supposed to use pip directly anymore, I created a virtual environment, with the option --system-site-packages since I only want to add a few things not packaged in Debian, and installed tensorflow in it. I now activate the environment, run sphinx-build, and... it fails to find tensorflow. The issue is that sphinx-build starts with #!/usr/bin/python3 , it does not use the python3 symlink that the activation added at the beginning of PATH, and thus does not look for packages in my active virtual environment. I have many possible workarounds: * execute python3 -m sphinx.cmd.build * execute python3 /usr/bin/sphinx-build * export a PYTHONPATH pointing to the virtual environment * install another copy of sphinx in the virtual environment etc but they essentially mean that the sphinx-build script shipped by Debian is useless to me, I just use the first workaround instead. The most natural change would be to use #!/usr/bin/env python3, but Debian policy says not to do that. Is there a way this policy could be relaxed when there is a good reason? Or is there another way to let sphinx-build do the right thing with virtual environments? Or should I resign myself? -- System Information: Debian Release: bookworm/sid APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'testing'), (500, 'stable'), (50, 'unstable-debug'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-5-amd64 (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages python3-sphinx depends on: ii python3 3.11.2-1 ii python3-alabaster 0.7.12-1 ii python3-babel 2.10.3-1 ii python3-distutils 3.11.2-2 ii python3-docutils 0.19+dfsg-6 ii python3-imagesize 1.4.1-1 ii python3-importlib-metadata 4.12.0-1 ii python3-jinja2 3.0.3-2 ii python3-packaging 23.0-1 ii python3-pygments 2.14.0+dfsg-1 ii python3-requests 2.28.1+dfsg-1 ii python3-snowballstemmer 2.2.0-2 ii sphinx-common 5.3.0-3 Versions of packages python3-sphinx recommends: ii make 4.3-4.1 ii python3-pil 9.4.0-1.1+b1 Versions of packages python3-sphinx suggests: ii dvipng 1.15-1.1+b1 ii fonts-freefont-otf 20120503-10 ii imagemagick-6.q16 8:6.9.11.60+dfsg-1.6 ii latexmk 1:4.79-1 ii libjs-mathjax 2.7.9+dfsg-1 ii python3-lib2to3 3.11.2-2 ii python3-sphinx-rtd-theme 1.2.0+dfsg-1 pn sphinx-doc <none> ii tex-gyre 20180621-6 ii texlive-fonts-recommended 2022.20230122-2 ii texlive-latex-extra 2022.20230122-2 ii texlive-latex-recommended 2022.20230122-2 ii texlive-plain-generic 2022.20230122-2 -- no debconf information