KeiruaProd

I help my clients acquire new users and make more money with their web businesses. I have ten years of experience with SaaS projects. If that’s something you need help with, we should get in touch!
< Back to article list

Solving python 3.10 _bz2 dependency error on ubuntu

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/

You May Also Enjoy