Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure CLI Python Dependency Issue #19106

Closed
theoaks opened this issue Aug 3, 2021 · 13 comments
Closed

Azure CLI Python Dependency Issue #19106

theoaks opened this issue Aug 3, 2021 · 13 comments

Comments

@theoaks
Copy link

theoaks commented Aug 3, 2021

This error keeps coming up. I have python installed. I've tried uninstalling and reinstalling several times, but this doesn't go away. Even googling has brought up no solution.

Command
$ az -v
Output
/usr/local/bin/az: line 2: /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python: No such file or directory

Please help

OS: Mac OS Big Sur (Version 11.4 (20F71))

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Aug 3, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Aug 3, 2021
@yonzhan yonzhan removed customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 3, 2021
@yonzhan yonzhan added this to the Aug 2021 (2021-09-07) milestone Aug 3, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 3, 2021

@jiasli for awareness

@Volatus
Copy link
Contributor

Volatus commented Aug 5, 2021

@theoaks Can you try clearing brew cache and maybe reinstalling Python as well? (through brew) I'm on MacOS Big Sur 11.5.1 (M1) and I don't have this problem with azcli 2.27.0.

@theoaks
Copy link
Author

theoaks commented Aug 5, 2021

Maybe I should run the latest update pending on my Mac and see if it fixes the issue

@theoaks
Copy link
Author

theoaks commented Aug 5, 2021

Done it... Same error on the new version

@Volatus
Copy link
Contributor

Volatus commented Aug 5, 2021

Done it... Same error on the new version

What Python version are you using?

@theoaks
Copy link
Author

theoaks commented Aug 5, 2021

Done it... Same error on the new version

What Python version are you using?

Version 3.9

@Volatus
Copy link
Contributor

Volatus commented Aug 5, 2021

Done it... Same error on the new version

What Python version are you using?

Version 3.9

Can you paste the output of which az ?

@theoaks
Copy link
Author

theoaks commented Aug 5, 2021

Done it... Same error on the new version

What Python version are you using?

Version 3.9

Can you paste the output of which az ?

/usr/local/bin/az

@Volatus
Copy link
Contributor

Volatus commented Aug 6, 2021

Done it... Same error on the new version

What Python version are you using?

Version 3.9

Can you paste the output of which az ?

/usr/local/bin/az

yeah that's concerning, can you try $(brew --prefix)/bin/az -v?

@jiasli
Copy link
Member

jiasli commented Aug 6, 2021

@Volatus, thanks for the investigation. 😊

I tested on Big Sur 11.5.1 with Intel chip but couldn't repro this issue either. @theoaks, are you on M1 chip?

Azure CLI uses Python 3.8 installed by Homebrew:

$ which az
/usr/local/bin/az

$ cat /usr/local/bin/az
#!/usr/bin/env bash
AZ_INSTALLER=HOMEBREW /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python -m azure.cli "$@"

$ ls -l /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python
lrwxr-xr-x  1 user1  admin  84 Jul 30 19:10 /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python -> ../../../../../opt/[email protected]/Frameworks/Python.framework/Versions/3.8/bin/python3.8

Could you share the result of

ls -l /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/

@theoaks
Copy link
Author

theoaks commented Aug 6, 2021

I'm on an Intel chip

ls -l /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python

lrwxr-xr-x 1 user admin 84 Jul 30 12:10 /usr/local/Cellar/azure-cli/2.27.0/libexec/bin/python -> ../../../../../opt/[email protected]/Frameworks/Python.framework/Versions/3.8/bin/python3.8

@jiasli
Copy link
Member

jiasli commented Aug 15, 2021

We recently bumped the underlying Python to 3.9 in Azure CLI 2.27.1. Some users report it is working as expected (#19027 (comment)), could you upgrade to the latest version?

@theoaks
Copy link
Author

theoaks commented Aug 15, 2021

We recently bumped the underlying Python to 3.9 in Azure CLI 2.27.1. Some users report it is working as expected (#19027 (comment)), could you upgrade to the latest version?

The issue is now resolved. Thanks

@theoaks theoaks closed this as completed Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants