az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
Get a permission denied error on /usr/local/Cellar/azure-cli/2.6.0/libexec/lib/python3.8/site-packages/azure_cosmos-3.1.0-py3.8.egg-info/PKG-INFO
I manually resolved it and then when I invoke a command I get a series of warning messages having to do with conditional statements in Python 3.8.x (installed with azure-cli)
To Reproduce
Occurs on macOS 10.15.4
su admin
brew install azure-cli
az login
Expected behavior
No Permission Denied error
No Python 3.8 warnings
Environment summary
azure-cli 2.6.0
macOS 10.15.4
zsh
Additional context
@fengzhou-msft please take a look
Same problem on my side since updated Python to 3.8 and az-cli, with brew
When I installed the cli using the native Linux method (no package management) it works just fine. No errors or warnings
@ericstephens is there some reason that you need to run su admin before brew install azure-cli?
@fengzhou-msft if it is like for me, it is due to non-admin rights on the account initially running the terminal. So brew will not execute correctly
This also occurred for me on azure-cli 2.9.1 on macOS 10.15.6 installed with Homebrew 2.4.8.
The installation was performed using a different user account (with administrator privileges) than the user who is running the az command. (Although it's not technically about administrator rights _per se_, it's about the files below being owned by the installation user and unreadable by anyone else.)
Other files in /usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages/ have the permissions set to -rw-r--r-- (0644), but the following files are set to -rw------- (600):
% cd /usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages
% find . -perm 600
./azure_cosmos-3.1.0-py3.8.egg-info/PKG-INFO
./azure_cosmos-3.1.0-py3.8.egg-info/SOURCES.txt
./azure_cosmos-3.1.0-py3.8.egg-info/requires.txt
./azure_cosmos-3.1.0-py3.8.egg-info/top_level.txt
./azure_cosmos-3.1.0-py3.8.egg-info/dependency_links.txt
One or more of these files are attempted to be read upon running az, so therefore no user other than the installation user can execute az unless these permissions are manually changed.
@PeterUpfold thanks for the clarification, that's exactly what I am facing.
On my side, the error starts on the 1st file you mentioned:
PermissionError: [Errno 13] Permission denied: '/usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages/azure_cosmos-3.1.0-py3.8.egg-info/PKG-INFO'
Doing the following fixed my az commands which were failing:
cd /usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages
find . -type f -perm 600 -exec chmod 644 {} \;
Yes - my default login does not have admin rights.
Sent from my iPhone
On Jun 28, 2020, at 23:47, Feng Zhou notifications@github.com wrote:

@ericstephens is there some reason that you need to run su admin before brew install azure-cli?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @shurd, @anfeldma-ms.
Please take a look at the comment about the file permission issue in azure_cosmos package.
@arrownj, I checked the file permission of azure_cosmos 3.2.0 tarball, these files now have the read permission for all users. Please help verify when you're testing the new homebrew package.
@fengzhou-msft , can you confirm once the package is released?
I just upgraded my azure-cli package from 2.10.0 to 2.10.1 and still got the issue:

@nrobert The azure-cosmos package is upgraded in this PR and is targeted to be released on August 25 with 2.11.0.
\o/
I can confirm that the error seems to be fixed in 2.11.0 on my machine. Thanks!
This looks like it is fixed for me too.
% az --version
azure-cli 2.11.0
@ericstephens : Please feel free to reactivate this if you still repro this. Closing this issues based on couple of confirmations.
Most helpful comment
@nrobert The
azure-cosmospackage is upgraded in this PR and is targeted to be released on August 25 with2.11.0.