Closed pkoushik closed 1 year ago
Azure CLI today doesn't release an 64-bit MSI installer and the workaround is to
pip
to install Azure CLI from PyPI https://pypi.org/project/azure-cli/:
pip install azure-cli
Appliance team has tried the suggested manual workaround and it works. However, Appliance VMware customers will have to do the same manual workaround to deploy Appliance which could be an adoption barrier and will require documentation.
GCP & AWS also support 64-bit MSI installers:
Since we are currently fully occupied with multiple high priority tasks we will add this feature request into our future roadmap.
Can 32-bit and 64-bit run on the same machine side by side?
If you follow the above workaround which uses pip
to install, then yes. Please be aware that there can only be one python.exe
on the PATH
. If you have both 32-bit and 64-bit Python installed, their default full paths should be
C:\Users\<user>\AppData\Local\Programs\Python\Python39\python.exe
C:\Users\<user>\AppData\Local\Programs\Python\Python39-32\python.exe
Depending on the location where you install azure-cli
, the commands differ.
You need to use the above full path to python.exe
to invoke pip
:
<full_path_to_python.exe> -m pip install azure-cli
Then use full path to invoke azure-cli
:
<full_path_to_python.exe> -m azure.cli
Create a virtual environment:
<full_path_to_python.exe> -m venv <env_name>
Activate the virtual environment:
.\<env_name>\Scripts\Activate.ps1
Then you don't need to specify the python.exe
to use and may simply run
pip install azure-cli
az ...
ℹ Note: If you have already install Azure CLI using MSI, az
installed by MSI and az
installed by pip
will conflict on PATH
. To solve it, either:
<full_path_to_python.exe> -m azure-cli
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd
PATH
environment variable so that az
is determined in a shell:
C:\Users\<user>\AppData\Local\Programs\Python\Python39\Scripts\
from PATH
under User variables or C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin
from PATH
under System variablesI had recently two of our top customers complain about the need to deploy Python 64 bit separately because their ITsec team has policies for the admin workstations to not allow standalone python installs (or any other programming language). If it is deployed with the Azure CLI this is acceptable though. This adds administrative overhead to the admin teams.
Hi @jiasli, recently we meet a similar issue due to embedded 32bit python. Java team release passwordless experience with Azure CLI and attract many customers, but part of it doesn't work now because pyodbc
is not compatible with 32bit python. It's very hard for users to build from source code for 32bit python which require many dependencies. Issue here: https://github.com/Azure/azure-cli/issues/24379
We know there's a workaround to install python and Azure CLI with pip, but users complain the experience is horrible. All links reference msi installation or package manager in Linux, normally people don't care about python and its versions
.
We see that many other teams have the same requirement, is there any plan when it could be support?
cryptography
39 shows warning on 32-bit Python (https://github.com/Azure/azure-cli/pull/25690)
>>> import cryptography.hazmat.bindings.openssl.binding
<stdin>:1: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System.
Cryptography will be significantly faster if you switch to using a 64-bit Python.
Is your feature request related to a problem? Please describe.
Today we see that Azure CLI MSI installer only supports a 32 bit install of Azure CLI. Many other cloud providers and projects are moving away from supporting 32 bit in favor of 64 bit. In our case, we are building an extension which leverages an SDK that only supports 64 bit. For that reason, for some calls in the extension we run into issues because of 32 bit limitation in CLI
Describe the solution you'd like We would like to see a natively supported 64 bit version of Azure CLI available to end users. This is available for AWS and GCP today, so it would be good to do the same in Azure.
Describe alternatives you've considered We had previously reached out the Azure CLI team and we were given a temporary workaround is to have Azure CLI point to a 64 bit version of python. I will try this, and see if it resolves our issues, but I believe we can find a more permanent solution.