I get the ModuleNotFoundError: no module named 'mysql' error when I run a Python script.
I am a novice to Python programming. The mysql-connector was installed via environment (python3 -m venv env). When env is active (source env/bin/activate) 'pip list' shows a (short) list including mysql-connector and the script runs without error. When env is not active, 'pip list' does not contain mysql-connector and the script fails with the above error. What am I missing? What do I have to do so that the script can run without activating env first?