I’m trying to run a Python script using:
python3 env/common_config/add_imagepullsecret.py
But I keep getting this error:
ImportError: No module named 'yaml'
I’ve already installed PyYAML, and running pip3 install pyyaml says:
Requirement already satisfied: pyyaml in /usr/lib64/python3.4/site-packages (3.12)
Still, the script fails with modulenotfounderror: no module named ‘yaml’. I suspect this might be a Python environment or version issue.
How can I fix this and ensure my script finds and imports the PyYAML module correctly?