azure-cli: Packages conflict for azure.storage.blob

Describe the bug I installed the code in azure-cli repo. The code dependent on package azure-storage-blob and it is installed. But I cannot import azure.storage.blob in python.

To Reproduce

  1. Clone the repo
  2. run python scripts/dev_setup.py
  3. run pip show azure-storage-blob, this package is installed.
  4. run python -c "import azure.storage.blob", get error ModuleNotFoundError: No module named 'azure.storage'

From my investigation, it might be introduced by https://github.com/Azure/azure-cli/pull/8855

Expected behavior azure.storage.blob can be imported.

Environment summary Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32

Additional context This is blocking the Docs CI, please take this issue as high priority.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

@tjprescott Thanks for the solution! Now I can finnally go through the Docs CI. And I also tested that the generated document is almost the same with before.

@tjprescott I find this PR because I run Docs CI locally for specified commit. The CI passed at commit 35f9aec6684fe36b1a08297e6b64b7a5b0f7f5b7 and failed at commit 9e360fc664c8acd0a1f1a9246fd58ffe5238acb5. The only difference between the two commits is #8855.

I have deeper investigation today, this could be related to pip version change in #8855. I think it is the reason why you did not repro it.

The difference comes from this command. When force-reinstall azure-nspkg==1.0.0 and azure-mgmt-nspkg==1.0.0 with pip==9.0.3 . It shows:

Successfully installed azure-nspkg-1.0.0
Successfully installed azure-mgmt-nspkg-1.0.0

When When force-reinstall with pip==19.0.3. It shows:

Successfully installed azure-nspkg-1.0.0
Successfully installed azure-mgmt-nspkg-1.0.0 azure-nspkg-3.0.2

Then the packages might be conflicted and I cannot import azure.storage.blob. If I manually force-reinstall azure-nspkg==1.0.0. This issue is gone.

The issue is temporarily mitigated but Docs CI keeps blocked. New changes will not be reflected in documents. It is possible to set the pip version to “pip~=9.0.1” like this Pull Request #9068?