This is the unofficial installation guide, please refer to the official guide at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
- download cygwin installation manager at https://cygwin.com/install.html
- prepare base cygwin environment with curl and wget packages:
setup-x86_64.exe -q -g -B -D -L -d -o -N -s http://cygwin.mirror.constant.com/ -l C:/cygwin/distro -R C:/cygwin -C Base -P curl,wget
(FAQ CLI), omit last two parameters-C Base -P curl,wget
to quietly update all cygwin packages, and optionally add-M
to reveal package manager - exec installed cygwin shell
- clean PATH environment variable:
export PATH="/usr/local/bin:/usr/bin"
(alternatively you may create a shortcutC:\cygwin\bin\mintty.exe -t "Cygwin Shell" -i "/Cygwin-Terminal.ico" /bin/env "CYGWIN_NOWINPATH=1" /bin/bash -l
) - install apt-cyg:
curl -sSL https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -o /bin/apt-cyg
- make apt-cyg executable:
chmod +x /bin/apt-cyg
- refresh apt-cyg cache:
apt-cyg update
- install required packages:
apt-cyg install python3 python3-devel gcc-g++ gcc-core libffi-devel openssl-devel make libsodium-devel libssl-devel
- create link to python3:
ln -s /usr/bin/python3 /usr/bin/python
- install pip:
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
- run install:
SODIUM_INSTALL=system pip install azure-cli
(may take some time to compile, if failed try to set specific version likeazure-cli==2.0.61
) - run external browser:
export BROWSER="cygstart"
- login:
az login
- confirm login in a web-browser
- check with:
az account show
andaz account list --o table
register cygwin in Windows context menu
apt-cyg install chere
chere -i -t mintty -e "Open Cygwin Here" -s bash -c -f -o '-t \"Cygwin Shell\" -i \"/Cygwin-Terminal.ico\"'
Hi,
This does not work for my latest cygwin installation. Is there a way to avoid psutil ?
Downloading https://files.pythonhosted.org/packages/c6/c1/beed5e4eaa1345901b595048fab1c85aee647ea0fc02d9e8bf9aceb81078/psutil-5.6.2.tar.gz (432kB)
|¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 440kB 25.9MB/s
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-09srxck_/psutil/
Traceback (most recent call last):
File "/tmp/azure_cli_install_tmp_SGHEU5", line 370, in
main()
File "/tmp/azure_cli_install_tmp_SGHEU5", line 356, in main
install_cli(install_dir, tmp_dir)
File "/tmp/azure_cli_install_tmp_SGHEU5", line 140, in install_cli
exec_command(cmd)
File "/tmp/azure_cli_install_tmp_SGHEU5", line 100, in exec_command
subprocess.check_call(command_list, cwd=cwd, env=env)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/user/lib/azure-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpbgcb1xo1', 'azure-cli', '--upgrade']' returned non-zero exit status 1.
Thank you
Markus