azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

ERROR: azure-cli 2.19.1 has requirement azure-cosmos>=3.0.2,~=3.0, but you'll have azure-cosmos 4.2.0 which is incompatible.

Open levalencia opened this issue 5 years ago • 5 comments

When I try to install cosmos sdk I get this output with several errors:

Collecting azure.cosmos
  Using cached azure_cosmos-4.2.0-py2.py3-none-any.whl (136 kB)
Requirement already satisfied: azure-core<2.0.0,>=1.0.0 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from azure.cosmos) (1.10.0)
Requirement already satisfied: six>=1.6 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from azure.cosmos) (1.15.0)
Requirement already satisfied: requests>=2.18.4 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from azure-core<2.0.0,>=1.0.0->azure.cosmos) (2.25.1)
Requirement already satisfied: chardet<5,>=3.0.2 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from requests>=2.18.4->azure-core<2.0.0,>=1.0.0->azure.cosmos) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from requests>=2.18.4->azure-core<2.0.0,>=1.0.0->azure.cosmos) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from requests>=2.18.4->azure-core<2.0.0,>=1.0.0->azure.cosmos) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from requests>=2.18.4->azure-core<2.0.0,>=1.0.0->azure.cosmos) (1.25.11)
ERROR: azure-cli 2.19.1 has requirement azure-cosmos>=3.0.2,~=3.0, but you'll have azure-cosmos 4.2.0 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement azure-graphrbac~=0.60.0, but you'll have azure-graphrbac 0.61.1 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement azure-mgmt-containerregistry==3.0.0rc16, but you'll have azure-mgmt-containerregistry 2.8.0 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement azure-mgmt-keyvault==8.0.0, but you'll have azure-mgmt-keyvault 2.2.0 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement azure-mgmt-storage~=16.0.0, but you'll have azure-mgmt-storage 11.2.0 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement cryptography<3.0.0,>=2.3.1, but you'll have cryptography 3.3.1 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement pytz==2019.1, but you'll have pytz 2021.1 which is incompatible.
ERROR: azure-cli 2.19.1 has requirement websocket-client~=0.56.0, but you'll have websocket-client 0.57.0 which is incompatible.
Installing collected packages: azure.cosmos
Successfully installed azure.cosmos
Requirement already satisfied: seaborn in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (0.11.1)
Requirement already satisfied: numpy>=1.15 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from seaborn) (1.18.5)
Requirement already satisfied: matplotlib>=2.2 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from seaborn) (3.2.1)
Requirement already satisfied: pandas>=0.23 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from seaborn) (0.25.3)
Requirement already satisfied: scipy>=1.0 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from seaborn) (1.5.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from matplotlib>=2.2->seaborn) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from matplotlib>=2.2->seaborn) (2.4.7)
Requirement already satisfied: cycler>=0.10 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from matplotlib>=2.2->seaborn) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from matplotlib>=2.2->seaborn) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from pandas>=0.23->seaborn) (2021.1)
Requirement already satisfied: six in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from cycler>=0.10->matplotlib>=2.2->seaborn) (1.15.0)

and If I try something as easy as this: from azure.cosmos import CosmosClient, PartitionKey

I get :

ImportError: cannot import name 'CosmosClient'

levalencia avatar Mar 04 '21 09:03 levalencia

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @southpolesteve, @zfoster

ghost avatar Mar 04 '21 09:03 ghost

Thanks for the report @levalencia - it's true that there are many cases where the azure-cli is using a locked SDK versions, which will generally be incompatible in a developer environment. How (and on what OS) was the CLI installed?

annatisch avatar Mar 04 '21 17:03 annatisch

This iwas in an Azure ML notebook, so it's a Linux os, the compute. Instance was created yesterday so I assume it has the latest Azure ML python sdk

Any way to fix this?

levalencia avatar Mar 04 '21 17:03 levalencia

Thanks @levalencia - I will keep investigating if something further can be done to properly resolve this without waiting on the Azure CLI to update their cosmos version. In the meantime, to get unstuck - you can find the 3.x version of the cosmos SDK here: https://github.com/Azure/azure-cosmos-python It includes all the samples and documentation you would need to work with this version of the SDK.

annatisch avatar Mar 04 '21 18:03 annatisch

It looks as though a short term solution was provided so we're now closing this issue. If it did not resolve it, please reopen the issue and we'll investigate further. Thanks! For internal MSFT use: https://msdata.visualstudio.com/Vienna/_workitems/edit/1120917

v-strudm-msft avatar Apr 02 '21 22:04 v-strudm-msft