What Do I Do If "ModuleNotFoundError: No module named 'xxx'" Is Displayed When I Invoke a Python Script?
Symptom
When I invoke a Python script, the system displays a message indicating that the Python dependency is missing, for example, "ModuleNotFoundError: No module named 'xxx'".

Possible Cause
The required dependency does not exist in the environment.
Solution
Run the following command to install the Python dependency based on the actual operating system:
pip3 install xxx
Parent topic: FAQs