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.64k stars 2.84k forks source link

Conda and pip package versions don't match #28456

Open crazy4pi314 opened 1 year ago

crazy4pi314 commented 1 year ago

Describe the bug There is a PyPi package for azure-ai-ml and a conda package which each use a different version numbering scheme (conda -> dates, PyPi -> semver.) This means that other packages that take a dependance on azure-ai-ml basically pick one or the other schema to pin and then the other won't work.

To Reproduce Steps to reproduce the behavior:

  1. Install azure-ai-ml from Microsoft's Conda channel in a conda environment with Python 3.10.
  2. Then install mldesigner from pip. It will not install due to a version incompatibility.
  3. If I uninstall the conda version of azure-ai-ml from conda and install the pip one, it works to install mldesigner.

Expected behavior Conda and PyPi versions of packages should use the same numbering system for releases.

xiangyan99 commented 1 year ago

Thanks for the feedback.

Unfortunately, it is by design that conda packages use dates rather than semver because it is not 1 on 1 mapping between conda packages and pypi packages.

Also we don't recommend mixing conda installation with pip installations.

We will have a conda version of mldesigner when there is a stable version released and for now, I would suggest you using pip installations to use the mldesigner package.

ghost commented 1 year ago

Hi @crazy4pi314. 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.

crazy4pi314 commented 1 year ago

@xiangyan99 Thanks for the reply! I am pretty sure that is not a limitation of conda in general, I regularly use pip and conda packages for things like numpy and pandas that have the same versioning on both. Is there another technical reason other than the platform itself that prevents this? /unresolve

xiangyan99 commented 1 year ago

It is not a technical issue that you/we :) cannot mix using conda and pip.

It is by design that the packages we shipped onto conda package are stable-only packages.

In most cases, it should work fine if you mix them with pip packages, but this scenario is not guaranteed to work.

crazy4pi314 commented 1 year ago

@xiangyan99 Sorry I wasn't referring to mixing conda and pip, but to the version number support on conda. I put some examples below for both conda-forge and microsoft channels below, so I was just trying to understand if there was a build/CI limitation making it not possible to match the versions.

Also fwiw in most of the DS/AI communities I work in conda is the primary env manager and folks mix conda and pip all the time.

xiangyan99 commented 1 year ago

There are two major reasons underneath.

  1. Our conda pacakges and pip packages are not 1 on 1 mapping. e.g. https://anaconda.org/microsoft/azure-storage this package includes https://pypi.org/project/azure-storage-blob/, https://pypi.org/project/azure-storage-queue/, https://pypi.org/project/azure-storage-file-share/ and https://pypi.org/project/azure-storage-file-datalake/.
  2. We try to ease our customers from the dependency tree. e.g. azure-storage packages and azure-keyvault package may need different versions of azure-core and azure-identity. If you use the conda packages from https://anaconda.org/microsoft, you can install all packages with same date (version) and all of them are tested and guaranteed to work together.