Config.py: ModuleNotFound: No module named 'carla'

I’m doing a debian install following the quickstart guide here: https://carla.readthedocs.io/en/latest/start_quickstart/

Everything is fine until I try to use the config.py script. When I do, it just gives me a ModuleNotFound: no module named 'carla' error. Am I supposed to be setting PYTHONPATH to something? There’s nothing in the docs about that.

Edit: The problem seems to be that I am using ubuntu 20.04. The python api only supports python 3.7, but 20.04 ships with 3.8.

Need to do two things to get everything to work under 20.04. First, set the PYTHONPATH to the carla egg file:

export PYTHONPATH=$PYTHONPATH:/opt/carla-simulator/PythonAPI/carla/dist/carla-0.9.10-py3.7-linux-x86_64.egg

Then, in any executable scripts, make sure the shebang invokes python 3:

#!/usr/bin/env python3

See comment here: https://github.com/carla-simulator/carla/issues/3374#issuecomment-736032719