Closed mihaimyh closed 3 years ago
Might be related to this https://github.com/pypa/setuptools/issues/2775
@jiasli for awareness
It's because you depend on jsmin
, which is no longer maintained: https://github.com/tikitu/jsmin/issues/33
setuptools
deprecated use_2to3
in v58.0.0:
https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5800
Breaking Changes
2086: Removed support for 2to3 during builds. Projects should port to a unified codebase or pin to an older version of Setuptools using PEP 518 build-requires.
Azure CLI requires jsmin
jsmin
requires use_2to3
, so it doesn't work with the latest setuptools
(https://github.com/tikitu/jsmin/issues/33), but jsmin
is not maintained anymore.
The failure causes pip
to install Azure CLI 2.0.73 which is the last version that doesn't depend on jsmin
(#10389).
For now, please pin the version of setuptools
until https://github.com/tikitu/jsmin/pull/34 is merged and Azure CLI starts to use the updated version, or Azure CLI drops jsmin
:
pip install setuptools==57.5.0
We have released a hotfix 2.28.1 specifically on PyPI: https://pypi.org/project/azure-cli/2.28.1/
Now Azure CLI installs correctly:
$ docker run -it --rm python /bin/bash
# pip install --upgrade setuptools
...
Successfully installed setuptools-58.0.4
# pip install azure-cli
...
Successfully installed ... azure-cli-2.28.1 azure-cli-core-2.28.1 ...
# az --version
azure-cli 2.28.1
core 2.28.1
telemetry 1.0.6
Python location '/usr/local/bin/python'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.9.7 (default, Sep 3 2021, 20:10:26)
[GCC 10.2.1 20210110]
@mihaimyh, @tgagor, thank you so much for reporting this issue and the precise analysis.
Is there a permanent fix for this issue? I was surprised to still be encountering it on a new install. It looks like the JSMin change was merged.
This issue has been fixed and the fix has been released long ago. Please try to install the latest Azure CLI (2.30.0).
I just tried installing azure-cli today and I am still getting this issue.
This is 3 years later and this issue still has not been fixed.
I am trying to install the latest az cli, but instead I am getting an older version due to a jsmin setup error:
Successfully installed PyJWT-1.7.1 adal-1.2.7 antlr4-python3-runtime-4.9.2 applicationinsights-0.11.10 argcomplete-1.12.3 azure-batch-8.0.0 azure-cli-2.0.73 azure-cli-command-modules-nspkg-2.0.3 azure-cli-core-2.0.73 azure-cli-nspkg-3.0.4 azure-cli-telemetry-1.0.6 azure-common-1.1.27 azure-core-1.18.0 azure-cosmos-3.2.0 azure-datalake-store-0.0.52 azure-devops-6.0.0b4 azure-functions-devops-build-0.0.22 azure-graphrbac-0.60.0 azure-identity-1.6.1 azure-keyvault-1.1.0 azure-keyvault-secrets-4.3.0 azure-mgmt-advisor-2.0.1 azure-mgmt-apimanagement-2.1.0 azure-mgmt-appconfiguration-2.0.0 azure-mgmt-applicationinsights-0.1.1 azure-mgmt-authorization-0.52.0 azure-mgmt-batch-7.0.0 azure-mgmt-batchai-2.0.0 azure-mgmt-billing-0.2.0 azure-mgmt-botservice-0.2.0 azure-mgmt-cdn-3.1.0 azure-mgmt-cognitiveservices-5.0.0 azure-mgmt-compute-6.0.0 azure-mgmt-consumption-2.0.0 azure-mgmt-containerinstance-1.5.0 azure-mgmt-containerregistry-3.0.0rc17 azure-mgmt-containerservice-5.3.0 azure-mgmt-core-1.3.0 azure-mgmt-cosmosdb-0.8.0 azure-mgmt-datalake-analytics-0.2.1 azure-mgmt-datalake-nspkg-3.0.1 azure-mgmt-datalake-store-0.5.0 azure-mgmt-datamigration-0.1.0 azure-mgmt-deploymentmanager-0.1.0 azure-mgmt-devtestlabs-2.2.0 azure-mgmt-dns-2.1.0 azure-mgmt-eventgrid-2.2.0 azure-mgmt-eventhub-2.6.0 azure-mgmt-hdinsight-1.1.0 azure-mgmt-imagebuilder-0.2.1 azure-mgmt-iotcentral-1.0.0 azure-mgmt-iothub-0.8.2 azure-mgmt-iothubprovisioningservices-0.2.0 azure-mgmt-keyvault-1.1.0 azure-mgmt-kusto-0.3.0 azure-mgmt-loganalytics-0.7.0 azure-mgmt-managedservices-1.0.0 azure-mgmt-managementgroups-0.2.0 azure-mgmt-maps-0.1.0 azure-mgmt-marketplaceordering-0.2.1 azure-mgmt-media-1.1.1 azure-mgmt-monitor-0.5.2 azure-mgmt-msi-0.2.0 azure-mgmt-netapp-0.5.0 azure-mgmt-network-4.0.0 azure-mgmt-nspkg-3.0.2 azure-mgmt-policyinsights-0.3.1 azure-mgmt-privatedns-0.1.0 azure-mgmt-rdbms-1.9.0 azure-mgmt-recoveryservices-0.4.0 azure-mgmt-recoveryservicesbackup-0.4.0 azure-mgmt-redis-6.0.0 azure-mgmt-relay-0.1.0 azure-mgmt-reservations-0.3.1 azure-mgmt-resource-3.1.0 azure-mgmt-search-2.1.0 azure-mgmt-security-0.1.0 azure-mgmt-servicebus-0.6.0 azure-mgmt-servicefabric-0.2.0 azure-mgmt-signalr-0.3.0 azure-mgmt-sql-0.12.0 azure-mgmt-sqlvirtualmachine-0.4.0 azure-mgmt-storage-4.2.0 azure-mgmt-trafficmanager-0.51.0 azure-mgmt-web-0.42.0 azure-multiapi-storage-0.2.4 azure-nspkg-3.0.2 azure-storage-blob-1.5.0 azure-storage-common-1.4.2 cryptography-2.9.2 fabric-2.6.0 humanfriendly-4.18 invoke-1.6.0 isodate-0.6.0 javaproperties-0.5.1 jsondiff-1.2.0 knack-0.6.3 mock-2.0.0 msal-1.14.0 msal-extensions-0.3.0 msrest-0.6.21 msrestazure-0.6.4 oauthlib-3.1.1 pathlib2-2.3.6 pbr-5.6.0 portalocker-1.7.1 psutil-5.8.0 pyOpenSSL-19.1.0 pydocumentdb-2.3.5 python-dateutil-2.8.2 pytz-2019.1 requests-oauthlib-1.3.0 scp-0.13.6 sshtunnel-0.1.5 tabulate-0.8.9 vsts-0.1.25 vsts-cd-manager-1.0.2 websocket-client-0.56.0 wheel-0.30.0 xmltodict-0.12.0