question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install of previous version is now broken

See original GitHub issue

Somehow older version(s) of az are now broken for pip install:

$ python3 -m venv venv
$ . ./venv/bin/activate
$ pip install azure-cli 2.0.23
...
$ az --version
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/private/tmp/venv/lib/python3.6/site-packages/azure/cli/__main__.py", line 9, in <module>
    import azure.cli.main
  File "/private/tmp/venv/lib/python3.6/site-packages/azure/cli/main.py", line 9, in <module>
    from azure.cli.core import configure_logging, get_az_logger
ImportError: cannot import name 'configure_logging'

Perhaps something in az core wasn’t pinned to an explicit version, so we’re pulling in a new, incompatible one accidentally?

This makes coming up with a workaround for #5218 difficult.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
derekbekoecommented, Jan 8, 2018

pip install azure-cli==2.0.23 would still pull down the latest of everything else as all the command modules are separate packages.

You should be able to install like this:

pip install -r https://gist.githubusercontent.com/derekbekoe/4e60d38f6243ab60cff41ad269cbf0ba/raw/aa7caf587892cc08d6ca3cb7cb85f7dc4b798cfa/azure-cli-2.0.23.txt

That worked for me.

This is how I created the requirements file if you’re wondering:

docker run -it azuresdk/azure-cli-python:2.0.23
pip freeze > requirements.txt
1reaction
derekbekoecommented, Jan 8, 2018

Yeah pip install azure-cli works best for the ‘latest’ CLI version. The requirements.txt may be a solution for you if you still want to install with pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to downgrade version of Python package by `pip install
This can break your system if the existing package is of a different version or was installed with a different package manager!
Read more >
Using Python's pip to Manage Your Projects' Dependencies
The pip command looks for the package in PyPI, resolves its dependencies, and installs everything in your current Python environment to ensure ...
Read more >
pip Command Not Found – Mac and Linux Error Solved
Install pip (older version). sudo easy_install pip. This command installs the pip command onto your system. Now try to use the pip command ......
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
Vendor in pip==22.3.1 which is currently the latest version of pip . ... Removes long broken argument --code from install and --unused from...
Read more >
How to Install Pip on Windows - ActiveState
But if you're using an older version of Python, pip will need to be manually installed. This tutorial steps through how to install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found