-
Notifications
You must be signed in to change notification settings - Fork 3k
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
AttributeError: module 'json' has no attribute 'JSONEncoder' #19691
Comments
@jiasli for awareness |
Azure CLI uses the python installed by Could you check the version of # You may need to replace version 2.28.0 with the one you are using in the future
ls -l /usr/local/Cellar/azure-cli/2.28.0/libexec/bin/python
/usr/local/Cellar/azure-cli/2.28.0/libexec/bin/python -V Also, can
|
Thanks for helping, @jiasli and @yonzhan.
I don't understand
Should I reinstall python 3.9.7. at This could be of use: https://docs.brew.sh/Homebrew-and-Python |
The current Azure CLI is 2.28.0. I am only saying in the future you may need to replace the version number with 2.29.0, 2.30.0, etc. 😄
What is the result of
Could you reinstall Python and see if
|
Still didn't worked:
Any more ideas? I have no clue. Maybe it's reinstalling on a different directory, but, as you said, user/local/cellar/azure-cli/2.28.0/libexec/bin/python is pointing to user/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin/python3.9. Again, thanks for the help @jiasli . |
Okay one information, the python3.9. comes from my operating system. |
@JoCo356, apparently the Python installation is broken:
I am not really sure why it fails. Perhaps you may reach out to Homebrew? https://github.com/Homebrew/discussions/discussions |
Hello, first I had this:
Then I did >> sudo rm -rf /usr/local/bin/python3
Now I have:
And
Hope you can help me, I am not an expert on this, but I want to be able to solve my problem. If you still think it is better to reach out homebrew, okay. |
The command name of Azure CLI is |
Yes, now |
Gonna mark this issue as done. :) |
Describe the bug
I can't run "az login" , "az versions" or "az upgrade", it shows up an AttributeError.
To Reproduce
Run "az login" or "az versions" on the terminal.
Expected behavior
I expected that when I runned az login an isolated window could open on the internet logging in.
Environment summary
I am using a macOS Catalina version 10.15.7 and I use .zshrc. I am trying to run "az login" in a pyenv which uses python 3.7.5.
Additional context
When I run "ls -l /System/Library/Frameworks/Python.framework/Versions" it gives me:
I already run "brew update && brew install python3 && brew upgrade python3" and "brew link --overwrite python3" and relinked again. And I am aware of this webpage https://docs.microsoft.com/pt-pt/cli/azure/install-azure-cli-macos?view=azure-cli-latest. I also run "brew upgrade" because it asked to do that after running "brew update", I had nghttp2 and openjdk outdated. and "brew reinstall azure-cli". When I run "brew update && brew install python3 && brew upgrade python3" it says:
And when "brew link --overwrite python3":
Tried the relink but didn't worked.
Also uninstalled with command "brew uninstall azure-cli" and re-installed with "brew update && brew install azure-cli", at my pyenv. Didn't work.
Hope you can help me.
The text was updated successfully, but these errors were encountered: