Add, try not to pip install the same or different versions of the system packages into venv, or if you do add a reminder to yourself.Thank you all for your replies. What initially seemed like a big change for working with Python in Bookworm, now seems rather more manageable!
To summarise:
Installing:
Install Python packages with apt where possible:Use a virtual environment where apt packages are not available:Code:
sudo apt install python3-packagename
Updating:Code:
python -m venv --system-site-packages [path/to/venv][path/to/venv]/bin/python -m pip install packagename
Update both system and virtual environment packagesRunning:Code:
sudo apt update && sudo apt upgrade[path/to/venv]/bin/python -m pip install --upgrade packagename
Run Python scripts with:Have I missed anything?Code:
[path/to/venv]/bin/python myscript.py
Scripsi
Statistics: Posted by bensimmo — Sat Mar 30, 2024 10:08 pm