Problem with paramiko

Hi, i try to use Ansible to Configure our Cisco Catalyst Switches.
But i got an error “{“changed”: false, “msg”: “paramiko is not installed: No module named ‘paramiko’”}”

To solve the Proble i tryed to install
pip3 install paramiko
apt install python3-paramiko
and add the following lines to ansible.cfg
transport = paramiko
ansible_python_interpreter: ‘{{ ansible_playbook_python }}’

enviroment:
Ubuntu bookworm/sid
ansible [core 2.17.0]
Python 3.10.12
paramiko 3.4.0

Nothing solved the problem. Do have somebody a idea to resolve the problem?

reguards

I’ve not used paramiko connections, so I might be wrong, but is the paramiko pip package required on the remote server as well as the Ansible controller?

Perhaps this would be clear if you posted the whole error message after running in verbose mode (-vvv)?

However this doesn’t appear to be documented on the ansible.builtin.paramiko_ssh connection page :person_shrugging:.

I don’t think paramiko is required on target host. Paramiko is still just an SSH client so having SSH server on target side should be enough.

@none I wonder how is you Ansible installed? If it does not see paramiko module even after pip3 install paramiko and/or apt install python3-paramiko then it is maybe installed inside virtual environment or container or something else?

1 Like