Forum Discussion
Finding Azure Batch Python client in Conda packaging
I've started working with Azure Batch and use Python, with my Python environment managed by Anaconda. I'd like to install the https://learn.microsoft.com/en-us/python/api/overview/azure/batch-readme?view=azure-python and https://learn.microsoft.com/en-us/python/api/overview/azure/mgmt-batch-readme?view=azure-python from the https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-overview in my Anaconda environments, preferably using conda instead of pip.
These are the azure.batch and azure.mgmt.batch modules (or "module packages"; whatever they're called), found in the azure-batch and azure-mgmt-batch PyPI packages. But I don't know where to find them in the Conda packaging of Azure SDK for Python.
The Azure SDK for Python introduced https://devblogs.microsoft.com/azure-sdk/python-conda-sdk-preview/ back in 2021, and its use is described in the https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-install?source=recommendations&tabs=conda. The Conda packaging differs from the PyPI packaging. The Python Azure SDK modules are packaged in to a smaller number of packages in the Conda form, with sometimes different naming.
Is the Azure Batch client library available in the Microsoft-supplied Conda packages somewhere (the ones in the microsoft conda channel, instead of the conda-forge channel)? If so, which Conda package?
And more generally, if I know what Azure SDK for Python module I want, or what PyPI package it's in, how can I find out which microsoft-channel Conda package it's in? I haven't been able to find a list of which module is in which Conda package anywhere.
There's an https://anaconda.org/conda-forge/azure-batch (instead of the microsoft channel). But if I understand correctly, those conda-forge Azure packages are the old ones from before the 2021 introduction of the microsoft conda channel's packaging, and have different dependencies and stuff.
I'd prefer to install the Azure Batch client from the microsoft-channel Conda packages, instead of the conda-forge channel package or from PyPI/pip, for consistency with my other Azure Python packages, which are all installed from the microsoft-channel Conda packages. I've read that mixing interdependent packages from different channels can sometimes cause problems, and if you're mixing conda-managed and pip-managed packages in an Anaconda environment, you're supposed to install all the conda packages first, then the pip packages, and then don't go back and install or update any conda packages afterwards, or something like that.
4 Replies
- xenekCopper Contributor
I also have hit a snag trying to prep up an old macbook.
I've got condanavigator, and thought I could add the microsoft channel then select some options to configure a python environment suitable for CLI and powershell access through to automate or at least, explore and interact with features of services within a trial Azure environment - particularly Purview. I thought, breeze in, tick some boxes, get started. Nope!
Adding the environment was easy enough, but then when I ticked azure, & azure storage, I hit snags. no doubt easy to resolve, but they do suggest there is more to the use of Azure in Conda with Python support than it seems. As per below:
LibMambaUnsatisfiableError: Encountered problems while solving:
- package azure-1.0.2-py27_1 requires python >=2.7,<2.8.0a0, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ azure is installable with the potential options
│ ├─ azure 1.0.2 would require
│ │ └─ python >=2.7,<2.8.0a0 , which can be installed;
│ ├─ azure 1.0.2 would require
│ │ └─ python >=3.5,<3.6.0a0 , which can be installed;
│ └─ azure 1.0.2 would require
│ └─ python >=3.6,<3.7.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
└─ python 3.12.* , which conflicts with any installable versions previously reported.
Pins seem to be involved in the conflict. Currently pinned specs:
- python 3.12.* (labeled as 'pin-1')Edit: tidy
- xenekCopper ContributorOh, forgot to mention: This seems to be the authoritative page. I guess the word 'preview' is the one to keep in mind.
https://devblogs.microsoft.com/azure-sdk/python-conda-sdk-preview/- xenekCopper ContributorI removed the Microsoft channel, then ticked three azure environment items from the built-in base (root) environment, and received the same errors.
LibMambaUnsatisfiableError: Encountered problems while solving:
- package azure-1.0.2-py27_1 requires python >=2.7,<2.8.0a0, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ azure is installable with the potential options
│ ├─ azure 1.0.2 would require
│ │ └─ python >=2.7,<2.8.0a0 , which can be installed;
│ ├─ azure 1.0.2 would require
│ │ └─ python >=3.5,<3.6.0a0 , which can be installed;
│ └─ azure 1.0.2 would require
│ └─ python >=3.6,<3.7.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
└─ python 3.12.* , which conflicts with any installable versions previously reported.
Pins seem to be involved in the conflict. Currently pinned specs:
- python 3.12.* (labeled as 'pin-1')