# Not able to install azcollection/requirements-azure.txt

**URL:** <https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138>\
**Category:** Get Help\
**Tags:** azure, collections\
**Created:** [April 25, 2024, 6:45am UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138 "2024-04-25T06:45:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayank\_gupta](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mayank_gupta/32/2995_2.png) [@mayank\_gupta](https://forum.ansible.com/u/mayank_gupta)\
**Post date:** [April 25, 2024, 6:45am UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/1 "2024-04-25T06:45:01Z")

</div>

I have tried installing with ansible latest version 2.16.6 and 2.15.0.  
Also tried with number of python versions as 3.12.3, 3.10.0, 3.11.0.

But getting same error when i do pip3 install -r ~/.ansible/collections/ansible\_collections/azure/azcollection/requirements-azure.txt

uamqp/c\_uamqp.c:112651:55: error: no member named ‘ob\_digit’ in ‘struct \_longobject’  
const digit\* digits = ((PyLongObject\*)x)-\>ob\_digit;  
~~~~~~~~~~~~~~~~~~ ^  
fatal error: too many errors emitted, stopping now [-ferror-limit=]  
294 warnings and 20 errors generated.  
error: command ‘/usr/bin/clang’ failed with exit code 1  
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.  
ERROR: Failed building wheel for uamqp  
Failed to build uamqp  
ERROR: Could not build wheels for uamqp, which is required to install pyproject.toml-based projects

How i can install it withput any errors.

I have also tried ignoring these error and running my ansible playbook which uses azure collection, but after manually installing multiple package it again gets me blocked at installing  
1.pip3 install azure-mgmt-compute azure-mgmt-network azure-mgmt-storage azure-mgmt-resource  
2. pip3 install azure.cli  
3.pip install azure.storage.blob  
4.pip install azure.mgmt.automation  
5.pip install azure.mgmt.notificationhubs  
6.pip install azure.mgmt.datafactory  
7.  
And stucks at  
TASK [Check the health of the Azure Web App] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘distutils’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “Failed to import the required Python library (ansible[azure] (azure \>= 2.0.0)) on MMDV4H9WJCJW5’s Python /Users/mayank.g/Documents/work/autotron-core/SRE-Autotron-DC-Tenant-Autotron-Cloud/ActionScripts/RestartWebAppService/my\_project/env/bin/python. 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”}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

(env) mayank.g@MMDV4H9WJCJW5 RestartWebAppService % pip install distutils  
ERROR: Could not find a version that satisfies the requirement distutils (from versions: none)  
ERROR: No matching distribution found for distutils  
(env) mayank.g@MMDV4H9WJCJW5 RestartWebAppService % pip3 install distutils  
ERROR: Could not find a version that satisfies the requirement distutils (from versions: none)  
ERROR: No matching distribution found for distutils  
(env) mayank.g@MMDV4H9WJCJW5 RestartWebAppService %

* * *

* * *

* * *

* * *

Also tried on a container based env with below versions  
1.Python 3.10.14,  
2.pip 24.0 from /app/my\_venv/lib/python3.10/site-packages/pip (python 3.10)  
3.ansible [core 2.16.6]

\*\*W SAME ERROR HERE ALSO WHILE INSTALLING THE **azure/azcollection/requirements-azure.txt**

but getting similar error as

(my\_venv) 4f158d9d8ae7:/app# ansible-playbook test.yml  
[WARNING]: No inventory was parsed, only implicit localhost is available  
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’

PLAY [Check Azure Web App status] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Check the health of the Azure Web App] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘msgraph’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “Failed to import the required Python library (ansible[azure] (azure \>= 2.0.0)) on 4f158d9d8ae7’s Python /app/my\_venv/bin/python. 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”}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

(my\_venv) 4f158d9d8ae7:/app# pip install msgraph  
ERROR: Could not find a version that satisfies the requirement msgraph (from versions: none)  
ERROR: No matching distribution found for msgraph

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 26, 2024, 4:58pm UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/2 "2024-04-26T16:58:23Z")

</div>

Can you share some info about your host OS?

`uname -a`  
`cat /etc/os-release`

---

<div class="post-metadata">

**Author:** ![mayank\_gupta](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mayank_gupta/32/2995_2.png) [@mayank\_gupta](https://forum.ansible.com/u/mayank_gupta)\
**Post date:** [April 29, 2024, 10:22am UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/3 "2024-04-29T10:22:30Z")

</div>

> [@Denney-tech](#):
>
> `uname -a`  
> `cat /etc/os-release`

@Denney-tech

Linux 4f158d9d8ae7 6.5.0-15-generic #15-Ubuntu SMP PREEMPT\_DYNAMIC Tue Jan 9 17:03:36 UTC 2024 x86\_64 Linux

NAME=“Alpine Linux”

ID=alpine

VERSION\_ID=3.17.6

PRETTY\_NAME=“Alpine Linux v3.17”

HOME\_URL=“[https://alpinelinux.org/](https://alpinelinux.org/)”

BUG\_REPORT\_URL=“[Issues · alpine / aports · GitLab](https://gitlab.alpinelinux.org/alpine/aports/-/issues)”

4f158d9d8ae7:/app#

---

<div class="post-metadata">

**Author:** ![mayank\_gupta](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mayank_gupta/32/2995_2.png) [@mayank\_gupta](https://forum.ansible.com/u/mayank_gupta)\
**Post date:** [May 6, 2024, 12:52pm UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/4 "2024-05-06T12:52:52Z")

</div>

Hello Team  
Any updates on this issue please  
@Denney-tech

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [May 6, 2024, 1:47pm UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/5 "2024-05-06T13:47:17Z")

</div>

> [@mayank\_gupta](#):
>
> ERROR: Failed building wheel for uamqp  
> Failed to build uamqp  
> ERROR: Could not build wheels for uamqp, which is required to install pyproject.toml-based projects

Hi, have you tried installing `uamqp` manually that are failing to build?

The uamqp documentation has the following statement:

> If you are running Alpine, you can install from source:
> 
> ```auto
> $ apk add --update python3 py-pip python3-dev cmake gcc g++ openssl-dev build-base
> $ pip3 install uamqp --no-binary :all:
> 
> ```
> 
> [uamqp · PyPI](https://pypi.org/project/uamqp/)

So try:

```bash
apk add --update python3 py-pip python3-dev cmake gcc g++ openssl-dev build-base
pip3 install uamqp --no-binary :all:
pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt

```

Any Python modules that use C extensions have a bit bad chemistry with Alpine Linux 😞

---

<div class="post-metadata">

**Author:** ![sophiacarter](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sophiacarter](https://forum.ansible.com/u/sophiacarter)\
**Post date:** [September 24, 2026, 3:21pm UTC](https://forum.ansible.com/t/not-able-to-install-azcollection-requirements-azure-txt/5138/6 "2026-09-24T15:21:00Z")

</div>

Any Python modules that use C extensions have a bit bad chemistry with Alpine Linux
