I have one script in which I am trying to execute
python3 env/common_config/add_imagepullsecret.py
But, I am getting the following error:
[root@kevin]# python3 env/common_config/add_imagepullsecret.py
Traceback (most recent call last):
File "env/common_config/add_imagepullsecret.py", line 4, in <module>
import yaml
ImportError: No module named 'yaml'
[root@kevin]# pip3 install pyyaml
Requirement already satisfied: pyyaml in /usr/lib64/python3.4/site-packages
(3.12)
[root@kevin]#
PyYAML is already installed in the machine:
[root@bhimsvm31 k8s]# pip3 install pyyaml
Requirement already satisfied: pyyaml in /usr/lib64/python3.4/site-packages
(3.12)
[root@bhimsvm31 k8s]#
How can I get this script to import PyYAML?
pip install pyyaml
This should serve the purpose