Hi Ubuntu is installed at windows10 and then the below commands are entered in the Ubunto. It looks like the installing ansible is successful without error message.
However, the installation mayby unsuccessful because we can see below message with command “ansible -v”. Please see the below. Did I miss some step for the installation? Anyone can help for this? Thank you
admin1@Le:~$ ansible -v
Traceback (most recent call last):
File “/usr/bin/ansible”, line 44, in
from ansible import context
File “/usr/local/lib/python3.8/dist-packages/ansible/context.py”, line 18, in
from ansible.module_utils.common._collections_compat import Mapping, Set
ModuleNotFoundError: No module named ‘ansible.module_utils’
Hi Ubuntu is installed at windows10 and then the below commands are entered in the Ubunto. It looks like the installing ansible is successful without error message.
This may sound like a broken record, I've personally tried to help
peopole walk through this before. The "ansible" no longer contains nor
provides any functional component of the old "ansible" software, those
are now published as a tarball called "ansible-core", which is very
confusing. I suspect you need to clear away old copies or update your
copy of "ansible-core".
Also, "Ubuntu is installed at Windows 10" does not mean you're
actually getting the Ubuntu provided version of everything unless
you're running in a VM or profoundly separated environment. Windows
can have its own python installed, and being sure you got the right
one and marged them cleanly can be..... well, an adventure.
However, the installation mayby unsuccessful because we can see below message with command "ansible -v". Please see the below. Did I miss some step for the installation? Anyone can help for this? Thank you
The "ansible" script and all its modules are in the "ansible-core"
package. You might simply discard the "ansible" package altogether and
use only "ansible-core" and see if it works for you. I've been
publishing .spec files to package up this stuff for RHEL based
operating systems, it's confusing over there as well.
there are two issues. first, after reinstalling, the issue is resolved, second, correct command is “ansible --version”. the reason that i used “ansible --v” is it worked before. but after reinstalling, the command cannot work
Thank all of you!!