# Ansible 2.10 - ModuleNotFoundError: No module named 'azure.mgmt.monitor.version'

**URL:** <https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981>\
**Category:** Ansible Project\
**Tags:** azure, galaxy-ng\
**Created:** [October 7, 2020, 11:09am UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981 "2020-10-07T11:09:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbmprivat](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@nbmprivat](https://forum.ansible.com/u/nbmprivat)\
**Post date:** [October 7, 2020, 11:09am UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981/1 "2020-10-07T11:09:37Z")

</div>

Hi,

I find it impossible to find good guides on how to switch to ansible 2.10 and use galaxy collections.

SUMMARY

Installed Ansible 2.10 and collection azure.azurecollection. I am unable to get Ansible 2.10 working with collections for my existing playbooks.

COMPONENT NAME

azure\_rm\_virtualmachine\_info

ANSIBLE VERSION2.10.2

STEPS TO REPRODUCE

- hosts: localhost gather\_facts: no collections: - azure.azcollection

ACTUAL RESULTS  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘azure.mgmt.monitor.version’ fatal: [127.0.0.1]: FAILED! =\> {“changed”: false, “msg”: “Failed to import the required Python library (ansible[azure] (azure \>= 2.0.0)) on ansible-test’s Python /usr/bin/python3. Please read the module documentation and install it 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”}

---

<div class="post-metadata">

**Author:** ![Hrvoje\_Gaspar](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@Hrvoje\_Gaspar](https://forum.ansible.com/u/Hrvoje_Gaspar)\
**Post date:** [October 8, 2020, 2:04pm UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981/2 "2020-10-08T14:04:46Z")

</div>

You should always take a look at the requirements for each module in collection:  
[https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure\_rm\_virtualmachine\_info\_module.html](https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_rm_virtualmachine_info_module.html)

The error is refering to missing python module.  
Have you installed azure sdk for python version 2.0 or higher??  
Run:

pip list

See if azure is on the list.  
If not, try and run:

pip install azure

If that doesn’t help, let me know.

Dana srijeda, 7. listopada 2020. u 13:09:37 UTC+2 korisnik [nbmp...@gmail.com](mailto:nbmp...@gmail.com) napisao je:

---

<div class="post-metadata">

**Author:** ![nbmprivat](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@nbmprivat](https://forum.ansible.com/u/nbmprivat)\
**Post date:** [October 9, 2020, 8:17am UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981/3 "2020-10-09T08:17:21Z")

</div>

Hi,

Thanks. The Azure SDK is no longer available.

sudo pip3 install azure  
[sudo] password for nbm:  
Collecting azure  
Using cached azure-5.0.0.zip (4.6 kB)  
ERROR: Command errored out with exit status 1:  
command: /usr/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-0sq87aw5/azure/setup.py’“'”‘; **file** =’“'”‘/tmp/pip-install-0sq87aw5/azure/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)( **file** );code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, **file** , ‘"’“‘exec’”’"‘))’ egg\_info --egg-base /tmp/pip-install-0sq87aw5/azure/pip-egg-info  
cwd: /tmp/pip-install-0sq87aw5/azure/  
Complete output (24 lines):  
Traceback (most recent call last):  
File “”, line 1, in   
File “/tmp/pip-install-0sq87aw5/azure/setup.py”, line 60, in   
raise RuntimeError(message)  
RuntimeError:

Starting with v5.0.0, the ‘azure’ meta-package is deprecated and cannot be installed anymore.  
Please install the service specific packages prefixed by `azure` needed for your application.

The complete list of available packages can be found at:  
[https://aka.ms/azsdk/python/all](https://aka.ms/azsdk/python/all)

Here’s a non-exhaustive list of common packages:

- azure-mgmt-compute ([https://pypi.python.org/pypi/azure-mgmt-compute](https://pypi.python.org/pypi/azure-mgmt-compute)) : Management of Virtual Machines, etc.
- azure-mgmt-storage ([https://pypi.python.org/pypi/azure-mgmt-storage](https://pypi.python.org/pypi/azure-mgmt-storage)) : Management of storage accounts.
- azure-mgmt-resource ([https://pypi.python.org/pypi/azure-mgmt-resource](https://pypi.python.org/pypi/azure-mgmt-resource)) : Generic package about Azure Resource Management (ARM)
- azure-keyvault-secrets ([https://pypi.python.org/pypi/azure-keyvault-secrets](https://pypi.python.org/pypi/azure-keyvault-secrets)) : Access to secrets in Key Vault
- azure-storage-blob ([https://pypi.python.org/pypi/azure-storage-blob](https://pypi.python.org/pypi/azure-storage-blob)) : Access to blobs in storage accounts

A more comprehensive discussion of the rationale for this decision can be found in the following issue:  
[https://github.com/Azure/azure-sdk-for-python/issues/10646](https://github.com/Azure/azure-sdk-for-python/issues/10646)

---

<div class="post-metadata">

**Author:** ![Hrvoje\_Gaspar](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@Hrvoje\_Gaspar](https://forum.ansible.com/u/Hrvoje_Gaspar)\
**Post date:** [October 14, 2020, 11:58am UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981/4 "2020-10-14T11:58:57Z")

</div>

Hey 🙂

Sorry for the late response, I was unable to check the group for a while.  
The azure sdk version does not need to be latest. It’s enough for it to be higher than version 2.0.

If the meta package became depricated with version 5.0, you can always install the latest before that.

Try this:  
sudo pip3 install ‘azure\<5.0’

Let me know if you encounter any furhter issues.

Dana petak, 9. listopada 2020. u 10:18:26 UTC+2 korisnik [nbmp...@gmail.com](mailto:nbmp...@gmail.com) napisao je:

---

<div class="post-metadata">

**Author:** ![nbmprivat](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@nbmprivat](https://forum.ansible.com/u/nbmprivat)\
**Post date:** [October 14, 2020, 12:07pm UTC](https://forum.ansible.com/t/ansible-2-10-modulenotfounderror-no-module-named-azure-mgmt-monitor-version/33981/5 "2020-10-14T12:07:38Z")

</div>

I also tried that and didnt work :-/ posting this bug in ansible will close right away. so not upgrading 🙂

ons. 14. okt. 2020 kl. 13.59 skrev Hrvoje Gašpar \<[moonchild.trooper@gmail.com](mailto:moonchild.trooper@gmail.com)\>:
