1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] ImportError: No module named 'yaml'

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    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?

    Continue reading...

Compartilhe esta Página