Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible. #6973

Closed
jongio opened this issue Aug 6, 2018 · 16 comments
Assignees

Comments

@jongio
Copy link
Member

jongio commented Aug 6, 2018

Describe the bug
Get this when I run pip install

azure-mgmt-batch 4.1.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-trafficmanager 0.40.0 has requirement msrestazure~=0.4.8, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-servicefabric 0.1.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-recoveryservices 0.1.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-cognitiveservices 1.0.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-eventhub 1.2.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-devtestlabs 2.0.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-datalake-analytics 0.2.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-keyvault 0.40.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-redis 4.1.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-recoveryservicesbackup 0.1.1 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-datalake-store 0.2.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-storage 1.5.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-iothubprovisioningservices 0.1.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.5.0 which is incompatible.
azure-keyvault 0.3.7 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.
azure-mgmt-cdn 1.0.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.5.0 which is incompatible.

To Reproduce

pip install azure-cli

Expected behavior

No errors

Environment summary

created py2 venv with
py -2 -m virtualenv c:\python27.virtualenv\py2

Additional context

i also have py3 installed

@yugangw-msft
Copy link
Contributor

//cc: @lmazuel @troydai. I believe this is an expected temporary glitch which will be fixed very soon

@jongio
Copy link
Member Author

jongio commented Aug 6, 2018

Workaround? It's breaking my py2 modules, which I need to ship soon.

@lmazuel
Copy link
Member

lmazuel commented Aug 6, 2018

@jongio That should not break anything, pip shows this as a warning but still installs everything. And this is still functionnal. Please describe how it breaks something?
Also, you can force a specific version of msrestazure while installing as a short term workaround

pip install msrestazure~=0.4.32 azure-cli

@jongio
Copy link
Member Author

jongio commented Aug 6, 2018

My module does this:

requirements = [
'Click>=6.0',
'docker>=3.4',
'python-dotenv',
'requests',
'fstrings',
'azure-cli-iot',
'azure-cli-profile',
'azure-cli-extension',
'azure-cli-configure',
'azure-cli-resource',
'azure-cli-cloud'
]

Which causes this when run:

I can work around this by removing all the azure-cli* entries and manually installing the azure-cli

pkg_resources.ContextualVersionConflict: (msrestazure 0.5.0 (c:\users\paymaunh\dev\runtime\python\.virtualenv\env27_2\lib\site-packages), Requirement.parse('msrestazure~=0.4.11'), set(['azure-mgmt-iothubprovisioningservices']))

Thx. I will try that version force as well.

@lmazuel
Copy link
Member

lmazuel commented Aug 6, 2018

Until CLI uses azure-mgmt-iothubprovisioningservices 0.2.0 which has the fix for this, add into your requirements to force msrestazure~=0.4.32

@jongio
Copy link
Member Author

jongio commented Aug 6, 2018

Confirming that this worked

requirements = [
    'Click>=6.0',
    'docker>=3.4',
    'python-dotenv',
    'requests',
    'fstrings',
    'msrestazure~=0.4.32',
    'azure-cli-iot',
    'azure-cli-profile',
    'azure-cli-extension',
    'azure-cli-configure',
    'azure-cli-resource',
    'azure-cli-cloud'
]

Also,

I got it to work by not running pip install -e ., instead running pip install . and then putting that project's root dir in the PYTHONPATH EnvVar.

@derekjc
Copy link

derekjc commented Aug 13, 2018

I've got the same problem. In addition, I'd also like to install "azure" and "azure-cli" together. This causes a bunch of modules to get uninstalled/replaced. Post install of azure-cli, if I try a pip3 install azure, I get:

  Found existing installation: azure-storage-common 1.1.0
    Uninstalling azure-storage-common-1.1.0:
      Successfully uninstalled azure-storage-common-1.1.0
  Found existing installation: azure-mgmt-batch 4.1.0
    Uninstalling azure-mgmt-batch-4.1.0:
      Successfully uninstalled azure-mgmt-batch-4.1.0
  Found existing installation: azure-mgmt-monitor 0.5.0
    Uninstalling azure-mgmt-monitor-0.5.0:
      Successfully uninstalled azure-mgmt-monitor-0.5.0
  Found existing installation: azure-mgmt-redis 4.1.0
    Uninstalling azure-mgmt-redis-4.1.0:
      Successfully uninstalled azure-mgmt-redis-4.1.0
  Found existing installation: azure-mgmt-iothubprovisioningservices 0.1.0
    Uninstalling azure-mgmt-iothubprovisioningservices-0.1.0:
      Successfully uninstalled azure-mgmt-iothubprovisioningservices-0.1.0
  Found existing installation: azure-mgmt-datamigration 0.1.0
    Uninstalling azure-mgmt-datamigration-0.1.0:
      Successfully uninstalled azure-mgmt-datamigration-0.1.0
  Found existing installation: azure-mgmt-containerservice 4.1.0
    Uninstalling azure-mgmt-containerservice-4.1.0:
      Successfully uninstalled azure-mgmt-containerservice-4.1.0
  Found existing installation: azure-mgmt-datalake-store 0.2.0
    Uninstalling azure-mgmt-datalake-store-0.2.0:
      Successfully uninstalled azure-mgmt-datalake-store-0.2.0
  Found existing installation: azure-mgmt-trafficmanager 0.40.0
    Uninstalling azure-mgmt-trafficmanager-0.40.0:
      Successfully uninstalled azure-mgmt-trafficmanager-0.40.0
  Found existing installation: azure-mgmt-media 1.0.0rc1
    Uninstalling azure-mgmt-media-1.0.0rc1:
      Successfully uninstalled azure-mgmt-media-1.0.0rc1
  Found existing installation: azure-mgmt-eventgrid 0.4.0
    Uninstalling azure-mgmt-eventgrid-0.4.0:
      Successfully uninstalled azure-mgmt-eventgrid-0.4.0
  Found existing installation: azure-mgmt-storage 1.5.0
    Uninstalling azure-mgmt-storage-1.5.0:
      Successfully uninstalled azure-mgmt-storage-1.5.0
  Found existing installation: azure-mgmt-network 2.0.0rc3
    Uninstalling azure-mgmt-network-2.0.0rc3:
      Successfully uninstalled azure-mgmt-network-2.0.0rc3
  Found existing installation: azure-mgmt-servicefabric 0.1.0
    Uninstalling azure-mgmt-servicefabric-0.1.0:
      Successfully uninstalled azure-mgmt-servicefabric-0.1.0
  Found existing installation: azure-mgmt-cdn 1.0.0
    Uninstalling azure-mgmt-cdn-1.0.0:
      Successfully uninstalled azure-mgmt-cdn-1.0.0
  Found existing installation: azure-mgmt-dns 2.0.0rc2
    Uninstalling azure-mgmt-dns-2.0.0rc2:
      Successfully uninstalled azure-mgmt-dns-2.0.0rc2
  Found existing installation: azure-mgmt-eventhub 1.2.0
    Uninstalling azure-mgmt-eventhub-1.2.0:
      Successfully uninstalled azure-mgmt-eventhub-1.2.0
  Found existing installation: azure-mgmt-keyvault 0.40.0
    Uninstalling azure-mgmt-keyvault-0.40.0:
      Successfully uninstalled azure-mgmt-keyvault-0.40.0
  Found existing installation: azure-mgmt-cognitiveservices 1.0.0
    Uninstalling azure-mgmt-cognitiveservices-1.0.0:
      Successfully uninstalled azure-mgmt-cognitiveservices-1.0.0
  Found existing installation: azure-mgmt-recoveryservices 0.1.0
    Uninstalling azure-mgmt-recoveryservices-0.1.0:
      Successfully uninstalled azure-mgmt-recoveryservices-0.1.0
  Found existing installation: azure-mgmt-recoveryservicesbackup 0.1.1
    Uninstalling azure-mgmt-recoveryservicesbackup-0.1.1:
      Successfully uninstalled azure-mgmt-recoveryservicesbackup-0.1.1
  Found existing installation: azure-mgmt-devtestlabs 2.0.0
    Uninstalling azure-mgmt-devtestlabs-2.0.0:
      Successfully uninstalled azure-mgmt-devtestlabs-2.0.0
  Found existing installation: azure-mgmt-datalake-analytics 0.2.0
    Uninstalling azure-mgmt-datalake-analytics-0.2.0:
      Successfully uninstalled azure-mgmt-datalake-analytics-0.2.0
  Found existing installation: azure-mgmt-cosmosdb 0.4.0
    Uninstalling azure-mgmt-cosmosdb-0.4.0:
      Successfully uninstalled azure-mgmt-cosmosdb-0.4.0
  Found existing installation: azure-mgmt-containerregistry 2.0.0
    Uninstalling azure-mgmt-containerregistry-2.0.0:
      Successfully uninstalled azure-mgmt-containerregistry-2.0.0
  Found existing installation: azure-storage-blob 1.1.0
    Uninstalling azure-storage-blob-1.1.0:
      Successfully uninstalled azure-storage-blob-1.1.0
  Found existing installation: azure-keyvault 0.3.7
    Uninstalling azure-keyvault-0.3.7:
      Successfully uninstalled azure-keyvault-0.3.7

Is there any way that I can specify a version of azure and azure-cli so that neither has broken dependencies?

@lmazuel
Copy link
Member

lmazuel commented Aug 13, 2018

azure and azure-cli are not compatible together, since they don't have the same purpose:

  • azure is designed SDK and will install the latest packages of each service
  • azure-cli is designed CLI/shell experience and SDK is an implementation detail, and having the latest of each SDK is not a requirement as long as each command is able to deliver the features needed.

TL;DR; developping SDK using azure-cli is a bad idea.

However, having CLI and a working SDK environment in the same shell makes total sense. What I would suggest is to use two virtualenvs, and link the az into your default PATH. Or pip install the CLI using --user, so the CLI is in your user site-packages, and use a venv on top of that for each SDK devlopment. Note that this is what CLI installers do: they don't install on your system site-packages, they install a venv. You could install the CLI on Windows with the installer or Ubuntu with the apt repo and get this installation for free.

Final note, azure itself is considered a "quickstart" package, and dev for production should be done by targetting individual package (i.e. azure-mgmt-compute).

@troydai
Copy link
Contributor

troydai commented Aug 14, 2018

We're in the process of updating dependencies of CLI SDKs to clear these incompatibilities. In reality, these incompatibilities won't impact CLI function. As Laurent mentioned, the azure-cli is not intended to be used as an SDK. It is an application. If there is part of its function is useful to you, please open issue to suggest extract them into independent module.

@tjprescott tjprescott added this to Triage in CodeGen Features via automation Nov 14, 2018
@tjprescott tjprescott moved this from Triage to High Priority in CodeGen Features Nov 14, 2018
@tjprescott tjprescott moved this from High Priority to In progress in CodeGen Features Nov 29, 2018
@tjprescott tjprescott moved this from In progress to High Priority in CodeGen Features Jan 29, 2019
@OddBloke
Copy link

This is still occurring, any plans to address it?

@lmazuel
Copy link
Member

lmazuel commented Feb 27, 2019

Hi @OddBloke , do you have the list of packages that still complains? I would have expected this to be empty by now :(

@OddBloke
Copy link

azure-mgmt-datalake-analytics 0.2.0 has requirement msrestazure~=0.4.7, but you'll have msrestazure 0.6.0 which is incompatible.
azure-mgmt-recoveryservicesbackup 0.1.1 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.6.0 which is incompatible.
azure-mgmt-recoveryservices 0.1.0 has requirement msrestazure~=0.4.11, but you'll have msrestazure 0.6.0 which is incompatible.

(Very easy to reproduce; just pip install azure-cli in a fresh virtualenv.)

@CognitiveClouds-Prasad
Copy link

I am facing the same issue. I was trying a lot of things. I realised that the problem is with this one.

@marstr
Copy link
Member

marstr commented Mar 12, 2019

I've submitted three PRs against the Azure/azure-sdk-for-python repository that should relieve this issue. It should be noted, that this is a workaround more than a fix. The best resolution would be for the commands involved to be updated to adopt the newest versions of the management libraries, as @yugangw-msft had started to do with #8751. However, we need to be able to adopt new versions of msrestazure sooner than would be feasible given the scope of the changes @yugangw-msft was going to have to make.

@marstr
Copy link
Member

marstr commented Mar 12, 2019

Thank you much, @lmazuel!

@tjprescott tjprescott moved this from High Priority to In progress in CodeGen Features Mar 12, 2019
marstr added a commit to marstr/azure-cli that referenced this issue Mar 12, 2019
tjprescott pushed a commit that referenced this issue Mar 12, 2019
* Add tolerance to key management library packages.

Fixes #6973

This is made possible by @lmazuel's awesome assistance, as well as PRs:
Azure/azure-sdk-for-python#4541
Azure/azure-sdk-for-python#4542
Azure/azure-sdk-for-python#3543

* Updating version numbers and release notes

* Responding to review feedback.

~= is okay, but the fix is actually to bump the version. It's better to be explicit.
@tjprescott tjprescott moved this from In progress to Done in CodeGen Features Mar 26, 2019
@marstr marstr mentioned this issue Mar 28, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

10 participants