I’m quite sick of this error that happens in all venv, here is the missing cp:
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
The solution is:
sudo cp /usr/lib/python3.10/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so .env/lib/python3.10/site-packages/