This error means that you have missing
bz2 headers (probably because you’ve built python from sources without this option enabled), so you need to install them first (for Ubuntu/Debian):
$ sudo apt-get install libbz2-dev
Now we need to reconfigure your python and reinstall it once again (version
3.6.5 for example below)
$ tar -xvf Python-3.6.5.tar.xz
Check whether it works properly now
$ python3.6 -c "import bz2"
should return without any errors. And make sure to recreate your virtual environment which will use new python executable
$ pipenv --python 3.6.5
You should be all set up now, continue the adventure!