title: Ansible K8s Install Fails - No module named Kubernetes, Failed to import the required Python Library
body: <p>I am running my playbook with the following command:</p>
  <pre><code>ansible-playbook kubernetes_cluster.yml -b --ask-pass -vvv
  </code></pre>
  <p>My error message is:</p>
  <pre><code>    Traceback (most recent call last):
    File &quot;/tmp/ansible_k8s_payload_2BRCdT/ansible_k8s_payload.zip/ansible/module_utils/k8s/common.py&quot;, line 33, in &lt;module&gt;
      import kubernetes
  ImportError: No module named kubernetes
  fatal: [kube1.idm.nac-issa.org]: FAILED! =&gt; {
      &quot;changed&quot;: false,
      &quot;error&quot;: &quot;No module named kubernetes&quot;,
      &quot;invocation&quot;: {
          &quot;module_args&quot;: {
              &quot;api_key&quot;: null,
              &quot;api_version&quot;: &quot;v1&quot;,
              &quot;append_hash&quot;: false,
              &quot;apply&quot;: false,
              &quot;ca_cert&quot;: null,
              &quot;client_cert&quot;: null,
              &quot;client_key&quot;: null,
              &quot;context&quot;: null,
              &quot;force&quot;: false,
              &quot;host&quot;: null,
              &quot;kind&quot;: &quot;Namespace&quot;,
              &quot;kubeconfig&quot;: &quot;/root/.kube/config&quot;,
              &quot;merge_type&quot;: null,
              &quot;name&quot;: &quot;&quot;,
              &quot;namespace&quot;: null,
              &quot;password&quot;: null,
              &quot;proxy&quot;: null,
              &quot;resource_definition&quot;: null,
              &quot;src&quot;: null,
              &quot;state&quot;: &quot;present&quot;,
              &quot;username&quot;: null,
              &quot;validate&quot;: null,
              &quot;validate_certs&quot;: null,
              &quot;wait&quot;: false,
              &quot;wait_condition&quot;: null,
              &quot;wait_sleep&quot;: 5,
              &quot;wait_timeout&quot;: 120
          }
      },
      &quot;msg&quot;: &quot;Failed to import the required Python library (openshift) on kube1.idm.nac-issa.org's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter&quot;
  </code></pre>
  <p>My environment:</p>
  <pre><code>ansible 2.9.16
    config file = /home/ansuser/ansible/ansible.cfg
    configured module search path = ['/home/ansuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/lib/python3.6/site-packages/ansible
    executable location = /usr/bin/ansible
    python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
  </code></pre>
  <p>I followed the directions from a similar question and performed the pip installs on the target host (not the management host)-
  <a href="https://stackoverflow.com/questions/60866755/ansible-k8s-module-failed-to-import-the-required-python-library-openshift-on">Ansible K8s module: Failed to import the required Python library (openshift) on Python /usr/bin/python3</a>
  and <a href="https://stackoverflow.com/questions/59304938/cannot-execute-k8s-module">Cannot execute k8s module</a>
  but that hasn't made any difference</p>
  <pre><code>pip3 install openshift pyyaml kubernetes and also `sudo pip3 install --upgrade --user openshift`
  </code></pre>
  <p>I'm stuck figuring out what to try next.  Any ideas are appreciated!</p>