local_install.sh doesn't work anymore with Debian 12 ?
Hello,
I have updated my laptop to Debian 12 (testing) and now local_install.sh doesn't work anymore:
turman@entropy:~/Repositories/woob$./tools/local_install.sh /home/turman/.local/bin/ Woob local installer
Installing woob applications into ‘/home/turman/.local/bin/’. error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. Traceback (most recent call last): File "/home/turman/Repositories/woob/./tools/local_install.py", line 44, in subprocess.check_call( File "/usr/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', '--user', '.']' returned non-zero exit status 1.
It looks like there were some changes about Python in Debian 12. Do we really have to create a virtual environment now ?
Note that the Debian package python3-pip is installed on my system (the pip command is my path).
Any help would be very appreciated as I'm not familiar at all with the Python environment and language.
Thanks, Vincent.