azure-cli: `pip install --upgrade azure-cli` fails on Cygwin due to psutil

Describe the bug I tried to upgrade azure-cli from 2.0.31 to the latest (2.0.62 as of writing)

To Reproduce pip install --upgrade azure-cli

Expected behavior az should upgrade.

Environment summary Windows 10 Cygwin (latest)

Additional context

Collecting psutil>=5.6.1 (from azure-cli-core==2.0.64->azure-cli)
  Using cached https://files.pythonhosted.org/packages/c6/c1/beed5e4eaa1345901b595048fab1c85aee647ea0fc02d9e8bf9aceb81078/psutil-5.6.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: platform cygwin is not supported
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-NwRvbi/psutil/

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 70 (22 by maintainers)

Most upvoted comments

@adewaleo, the psutil was pulled in for the new az feedback, anyway we can find an alternative?

after https://github.com/Azure/azure-cli/pull/11665 has been merged it is possible to install latest azure-cli in cygwin

Virtualenv is a virtual environment (see https://docs.python.org/3/library/venv.html), rather than installing modules globally you install them to a separate directory, kind of like how PHP’s composer, Ruby’s bundler, and Node.js’s npm.

EDIT:

  • composer installs to vendor in each project
  • bundler installs globally by default (but can go to a vendor folder), and works out deps at runtime by using the Gemfile/Gemfile.lock
  • npm installs to node_modules for each project

Thanks!

Commands seem to run fine once logged in

I had to do export BROWSER='cygstart' which I never had to do before haha, weird.

(env) /c/src/azure-cli (dev) [0] $ which az
/c/src/azure-cli/env/bin/az
(env) /c/src/azure-cli (dev) [0] $ time az
...
real    0m6.797s
user    0m3.106s
sys     0m3.368s

OK I ran the command:

(env) /c/src/azure-cli (dev) [0] $ azdev setup -c .

=======================
| Azure CLI Dev Setup |
=======================

Azure CLI:
    /c/src/azure-cli


 Installing packages
=====================

Upgrading pip...
Installing `requirements.txt`...
Installing `azure-cli-nspkg`...
Installing `azure-cli-telemetry`...
Installing `azure-cli-core`...
Installing `azure-cli`...
Installing `azure-cli-testsdk`...
Installing `azure-nspkg`...
Installing `azure-mgmt-nspkg`...

Elapsed time: 41 min 58 sec

 Finished dev setup!
=====================

It took a really long time, I’m not sure why as this is a powerful machine…