For my environment, and most likely other environments, Ansible most likely is going to be installed under a virtual environment, I have noticed this if you use pip to install Ansible. Please use my photos for reference. In photo two, the output of ansible --version, you see the "ansible python module" that is where python is looking for the library always. But in the output of my photo 5, "pip install meraki" You can see that the location it is placing it is not the same. My solution was to use the cp -R and place it in the virtual environment. Basically the default location the python modules are going to is the similar path structure as the virtual environment. So for example, the commands are going to look similar to: cp -R /usr/local/lib/<your python version>/site-packages/<package, i.e. urllib3> /home/<your username>/.local/pipx/venvs/<your virtual environment>/lib/<your python version>/site-packages/<package, i.e. urllib3>
cp -R /usr/local/lib64/<your python version>/site-packages/<package, i.e. aiohttp> /home/<your username>/.local/pipx/venvs/<your virtual environment>/lib64/<your python version>/site-packages/<package, i.e. aiohttp> You can run pip install meraki again to get the packages needed, and where they installed it to. Please pay attention to keep the lib and lib64 directories the same so you dont place them into incorrect directories. To ultimately avoid this in the future like if you were to install it again is to run the source command and enter the virtual environment, and then install it that way. If you install the python library not in the virtual environment first, then any time you wish to install it through the virtual environment it will say its already installed. I hope this explaination helps you.
... View more