question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pip` installs `azure-cli` 2.0.73 because of the dependency on deprecated `jsmin`

See original GitHub issue

I am trying to install the latest az cli, but instead I am getting an older version due to a jsmin setup error:

python -m pip install --upgrade wheel setuptools
python -m pip install --upgrade azure-cli azure-devops azure-keyvault-secrets azure-identity
python -m pip install --upgrade testresources
# python -m pip install --upgrade cryptography
python -m pip install --upgrade requests

2021-09-07T11:26:04.9965939Z   Downloading https://pkgs.dev.azure.com/mihaimyh/49255723-5232-4e9f-9501-068bf5e381a9/_packaging/e1661b2f-7e5d-484a-aab6-54c2a1cb5b0e/pypi/download/jsmin/2.2.2/jsmin-2.2.2.tar.gz (12 kB)
2021-09-07T11:26:05.2418035Z     ERROR: Command errored out with exit status 1:
2021-09-07T11:26:05.2421084Z      command: /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a863hy6i/jsmin_710895a4c3e44d21a48f56af2b8b8174/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a863hy6i/jsmin_710895a4c3e44d21a48f56af2b8b8174/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-etdryiat
2021-09-07T11:26:05.2423588Z          cwd: /tmp/pip-install-a863hy6i/jsmin_710895a4c3e44d21a48f56af2b8b8174/
2021-09-07T11:26:05.2424522Z     Complete output (1 lines):
2021-09-07T11:26:05.2424978Z     error in jsmin setup command: use_2to3 is invalid.
2021-09-07T11:26:05.2425795Z     ----------------------------------------
2021-09-07T11:26:05.2429984Z WARNING: Discarding https://pkgs.dev.azure.com/mihaimyh/49255723-5232-4e9f-9501-068bf5e381a9/_packaging/e1661b2f-7e5d-484a-aab6-54c2a1cb5b0e/pypi/download/jsmin/2.2.2/jsmin-2.2.2.tar.gz#sha256=b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b (from https://pkgs.dev.azure.com/mihaimyh/IngOne/_packaging/P10641-incoming/pypi/simple/jsmin/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2021-09-07T11:26:05.2515374Z Collecting azure-cli

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jiaslicommented, Sep 9, 2021

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.

0reactions
jiaslicommented, Nov 30, 2021

This issue has been fixed and the fix has been released long ago. Please try to install the latest Azure CLI (2.30.0).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release notes & updates – Azure CLI - Microsoft Learn
az sql vm update : Deprecate the --yes prompt to upgrade SqlIaaSAgent extension to ... pip installs azure-cli 2.0.73 because of the dependency...
Read more >
Install Azure CLI on Windows 10 using Python pip
Azure CLI 2 is written in Python, and so I suggest installing it with Python instead. There are a couple of reasons for...
Read more >
azure-cli - PyPI
A great cloud needs great tools; we're excited to introduce Azure CLI, our next generation multi-platform command line experience for Azure.
Read more >
What does this deprecation warning mean, and how to fix it?
In short, my understanding: pip builds a tree of dependencies between packages. currently pip requires a temporary folder; this leads ...
Read more >
Install — conan 1.46.2 documentation
In Windows, Python 3 installation can fail installing the wrapt dependency because of a bug in pip. Information about this issue and workarounds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found