Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.63k stars 2.84k forks source link

Installing a python package from Azure DevOps Artifacts feed in python:3.9-slim #28143

Closed dvu4 closed 1 year ago

dvu4 commented 1 year ago

I am currently working on python:3.9-slim docker image and trying to install a private python package from Azure DevOps Artifacts feed which is using azure-servicebus and azure-data-tables , and I got the following error. I followed the instruction in the issue #27902 but did not succeed. Could you help me to resolve this issue ?


#13 42.22   error: subprocess-exited-with-error
#13 42.22   
#13 42.22   × Building wheel for uamqp (pyproject.toml) did not run successfully.
#13 42.22   │ exit code: 1
#13 42.22   ╰─> [103 lines of output]
#13 42.22       running bdist_wheel
#13 42.22       running build
#13 42.22       running build_py
#13 42.22       creating build
#13 42.22       creating build/lib.linux-aarch64-cpython-39
#13 42.22       creating build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/types.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/message.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/mgmt_operation.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/__init__.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/session.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/compat.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/utils.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/sender.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/client.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/connection.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/address.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/errors.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/receiver.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       copying uamqp/constants.py -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       creating build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/client_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/sender_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/__init__.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/utils.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/receiver_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/connection_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/session_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       copying uamqp/async_ops/mgmt_operation_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/async_ops
#13 42.22       creating build/lib.linux-aarch64-cpython-39/uamqp/authentication
#13 42.22       copying uamqp/authentication/__init__.py -> build/lib.linux-aarch64-cpython-39/uamqp/authentication
#13 42.22       copying uamqp/authentication/cbs_auth_async.py -> build/lib.linux-aarch64-cpython-39/uamqp/authentication
#13 42.22       copying uamqp/authentication/cbs_auth.py -> build/lib.linux-aarch64-cpython-39/uamqp/authentication
#13 42.22       copying uamqp/authentication/common.py -> build/lib.linux-aarch64-cpython-39/uamqp/authentication
#13 42.22       running egg_info
#13 42.22       writing uamqp.egg-info/PKG-INFO
#13 42.22       writing dependency_links to uamqp.egg-info/dependency_links.txt
#13 42.22       writing requirements to uamqp.egg-info/requires.txt
#13 42.22       writing top-level names to uamqp.egg-info/top_level.txt
#13 42.22       reading manifest file 'uamqp.egg-info/SOURCES.txt'
#13 42.22       reading manifest template 'MANIFEST.in'
#13 42.22       writing manifest file 'uamqp.egg-info/SOURCES.txt'
#13 42.22       copying uamqp/c_uamqp.c -> build/lib.linux-aarch64-cpython-39/uamqp
#13 42.22       warning: build_py: byte-compiling is disabled, skipping.
#13 42.22       
#13 42.22       running build_ext
#13 42.22       will build uamqp in build/temp.linux-aarch64-cpython-39/cmake
#13 42.22       Building with generator flags: -G "Unix Makefiles"
#13 42.22       calling cmake /tmp/pip-install-5mjpe1c0/uamqp_72f3c6a3ba2c4d9aaad785ccfa682892/src/vendor/azure-uamqp-c/ -G "Unix Makefiles" -Duse_openssl:bool=ON -Duse_default_uuid:bool=ON  -Duse_builtin_httpapi:bool=ON  -Dskip_samples:bool=ON -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release
#13 42.22       CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
#13 42.22       CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
#13 42.22       CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
#13 42.22       -- Configuring incomplete, errors occurred!
#13 42.22       See also "/tmp/pip-install-5mjpe1c0/uamqp_72f3c6a3ba2c4d9aaad785ccfa682892/build/temp.linux-aarch64-cpython-39/cmake/CMakeFiles/CMakeOutput.log".
#13 42.22       Traceback (most recent call last):
#13 42.22         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
#13 42.22           main()
#13 42.22         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
#13 42.22           json_out['return_val'] = hook(**hook_input['kwargs'])
#13 42.22         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
#13 42.22           return _build_backend().build_wheel(wheel_directory, config_settings,
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
#13 42.22           return self._build_with_temp_dir(['bdist_wheel'], '.whl',
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
#13 42.22           self.run_setup()
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
#13 42.22           super(_BuildMetaLegacyBackend,
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
#13 42.22           exec(code, locals())
#13 42.22         File "<string>", line 260, in <module>
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
#13 42.22           return distutils.core.setup(**attrs)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
#13 42.22           return run_commands(dist)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
#13 42.22           dist.run_commands()
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
#13 42.22           self.run_command(cmd)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
#13 42.22           super().run_command(command)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#13 42.22           cmd_obj.run()
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
#13 42.22           self.run_command("build")
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
#13 42.22           self.distribution.run_command(command)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
#13 42.22           super().run_command(command)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#13 42.22           cmd_obj.run()
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
#13 42.22           self.run_command(cmd_name)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
#13 42.22           self.distribution.run_command(command)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
#13 42.22           super().run_command(command)
#13 42.22         File "/tmp/pip-build-env-0625zamf/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#13 42.22           cmd_obj.run()
#13 42.22         File "<string>", line 134, in run
#13 42.22         File "<string>", line 183, in build_cmake
#13 42.22         File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
#13 42.22           raise CalledProcessError(retcode, cmd)
#13 42.22       subprocess.CalledProcessError: Command 'cmake /tmp/pip-install-5mjpe1c0/uamqp_72f3c6a3ba2c4d9aaad785ccfa682892/src/vendor/azure-uamqp-c/ -G "Unix Makefiles" -Duse_openssl:bool=ON -Duse_default_uuid:bool=ON  -Duse_builtin_httpapi:bool=ON  -Dskip_samples:bool=ON -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release' returned non-zero exit status 1.
#13 42.22       [end of output]
#13 42.22   
#13 42.22   note: This error originates from a subprocess, and is likely not a problem with pip.
#13 42.22   ERROR: Failed building wheel for uamqp
#13 42.22   Building wheel for pendulum (pyproject.toml): started
#13 42.68   Building wheel for pendulum (pyproject.toml): finished with status 'done'
#13 42.68   Created wheel for pendulum: filename=pendulum-2.1.2-cp39-cp39-manylinux_2_31_aarch64.whl size=109777 sha256=cbfa9857e677d214e7cb92aa9238c5b3d6d648a8de97e9cfb17076057faf65f8
#13 42.68   Stored in directory: /root/.cache/pip/wheels/76/ce/18/d6d0ab24c15c9e8460b0657def1382c9b299c3d44622d1d1f4
#13 42.68   Building wheel for snaptime (setup.py): started
#13 43.10   Building wheel for snaptime (setup.py): finished with status 'done'
#13 43.11   Created wheel for snaptime: filename=snaptime-0.2.4-py3-none-any.whl size=3593 sha256=6e5c7372124cc54f87e631447ef35ed599a89133ba32f60083fedd39f10377de
#13 43.11   Stored in directory: /root/.cache/pip/wheels/13/bd/2b/a5534e04a0b2b4a49f7ce54265458e0f3987d35b4bce59cd40
#13 43.11   Building wheel for validate-email (setup.py): started
#13 43.51   Building wheel for validate-email (setup.py): finished with status 'done'
#13 43.51   Created wheel for validate-email: filename=validate_email-1.3-py3-none-any.whl size=5482 sha256=0d0eb1be70b2f2b82c8d566bbf425f051278ba87ebdc4c1c94a6c5e56ab18e91
#13 43.51   Stored in directory: /root/.cache/pip/wheels/b2/3f/33/dde9e091e4bd6b23f693279a5b0a62701a078bdf990e9d73f5
#13 43.51 Successfully built pytest-mockito pytest-pythonpath pendulum snaptime validate-email
#13 43.51 Failed to build uamqp
#13 43.51 ERROR: Could not build wheels for uamqp, which is required to install pyproject.toml-based projects
------
executor failed running [/bin/bash -c pip install dist/*.whl --extra-index-url=PIP_EXTRA_INDEX_URL]: exit code: 1```
kashifkhan commented 1 year ago

Hi @dvu4, thank for your feedback. Is the docker for arm linux, since I am seeing linux-aarch64 in the logs?

dvu4 commented 1 year ago

@kashifkhan, yes the docker is for arm linux

kashifkhan commented 1 year ago

@dvu4 unfortunately uamqp is not supported on the ARM platform. and thats why its not building. If you are able to switch over to x86 then the instructions from the other issue will apply. A debian based image x86 would not need the compilation step.

My team is currently working to replace uamqp with a pure python implementation which will remove the need for compilation but that is a few months away.

ghost commented 1 year ago

Hi @dvu4. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost commented 1 year ago

Hi @dvu4, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.