Fails to install on windows
See original GitHub issueDescription
I am just running the install script in the readme and it fails:
$ curl -L https://aka.ms/InstallAzureCli | bash
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here:
I am running the latest version of Git Bash and I just ran the curl script from the README.
CLI Version: What version of the CLI and modules are installed? (Use az --version
)
Answer here:
I don’t know because I can’t install it.
OS Version: What OS and version are you using?
Answer here:
Windows 10.
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here:
Git Bash (aka bash)
Extra Info: I have python27 already installed on my machine because nodejs requires it. I see in the output its trying to install python and pip:
Already using interpreter C:\Python27\python.exe
New python executable in E:\azure\Scripts\python.exe
Installing setuptools, pip, wheel...done.
When I look in my bin folder it is empty:
But python is in the azure scripts folder:
But the error states the path its trying to exectute pip at is in the bin
folder:
-- Executing: ['E:\\azure\\bin\\pip', 'install', '--cache-dir', 'c:\\users\\justin\\appdata\\local\\temp\\tmp3v1zxj', 'azure-cli', '--upgrade']
I believe the path should be E:\\azure\\Scripts\\pip
. Interestingly E:\\azure\\bin\\
does not exist at all.
Full Error:
$ curl -L https://aka.ms/InstallAzureCli | bash
100 167 100 167 0 0 167 0 0:00:01 --:--:-- 0:00:01 594
100 1367 100 1367 0 0 1367 0 0:00:01 --:--:-- 0:00:01 6733
Downloading Azure CLI install script from https://azurecliprod.blob.core.windows.net/install.py to /tmp/azure_cli_install_tmp_1Nrb.
######################################################################## 100.0%
/tmp/azure_cli_install_tmp_1Nrb: OK
Running install script.
-- Verifying Python version.
-- Python version 2.7.6 okay.
===> In what directory would you like to place the install? (leave blank to use 'C:\Users\justin\lib\azure-cli'): E:\azure
-- Creating directory 'E:\azure'.
-- We will install at 'E:\azure'.
===> In what directory would you like to place the 'az' executable? (leave blank to use 'C:\Users\justin\bin'): E:\bin
-- Creating directory 'E:\bin'.
-- The executable will be in 'E:\bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz.
-- Downloaded virtualenv package to c:\users\justin\appdata\local\temp\tmp3v1zxj\virtualenv-15.0.0.tar.gz.
-- Checksum of c:\users\justin\appdata\local\temp\tmp3v1zxj\virtualenv-15.0.0.tar.gz OK.
-- Extracting 'c:\users\justin\appdata\local\temp\tmp3v1zxj\virtualenv-15.0.0.tar.gz' to 'c:\users\justin\appdata\local\temp\tmp3v1zxj'.
-- Executing: ['C:\\Python27\\python.exe', 'virtualenv.py', '--python', 'C:\\Python27\\python.exe', 'E:\\azure']
Already using interpreter C:\Python27\python.exe
New python executable in E:\azure\Scripts\python.exe
Installing setuptools, pip, wheel...done.
-- Executing: ['E:\\azure\\bin\\pip', 'install', '--cache-dir', 'c:\\users\\justin\\appdata\\local\\temp\\tmp3v1zxj', 'azure-cli', '--upgrade']
Traceback (most recent call last):
File "C:/Users/justin/AppData/Local/Temp/azure_cli_install_tmp_1Nrb", line 370, in <module>
main()
File "C:/Users/justin/AppData/Local/Temp/azure_cli_install_tmp_1Nrb", line 356, in main
install_cli(install_dir, tmp_dir)
File "C:/Users/justin/AppData/Local/Temp/azure_cli_install_tmp_1Nrb", line 140, in install_cli
exec_command(cmd)
File "C:/Users/justin/AppData/Local/Temp/azure_cli_install_tmp_1Nrb", line 100, in exec_command
subprocess.check_call(command_list, cwd=cwd, env=env)
File "C:\Python27\lib\subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@derekbekoe Should the README just link to the install page on docs rather than containing its own install instructions? There are so many different recommended installation methods depending on the user system that I would be worried about drift.
EDIT Just saw this was already done. 👍
On second thought I guess I can just run everything through the subsystem… I have been using VS Code to do this but it looks like there may be a solution: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows Subsystem for Linux.md
And if not I guess I can live with just doing it all through the subsystem. I’ll play around with it thanks.