Unable to import sklearn after installing any package

Hi all,
In our Jupyterhub we are using Py3.6 version. This py36 version is a venv. Recently we are facing this issue.
Whenever we install any new package using pip install command it installs and the chmod is for the new folders in the location “/usr/share/miniconda2/envs/py36/lib/python3.6/site-packages/” is 750. Immediately after that we can not import sklearn and getting the follow error message.
[Errno 13] Permission denied: ‘/usr/share/miniconda2/envs/py36/lib/python3.6/site-packages/PyAudio-0.2.11.dist-info’
We installed pyaudio just now.
The issue is resolved when I ran chmod and set 755 permission.
chmod 755 -R /usr/share/miniconda2/envs/py36/lib/python3.6/site-packages/PyAudio-0.2.11.dist-info
Not sure 755 is the right access. Please confirm how to resolve this.

Thanks

It looks like it’s a Conda environment, rather than a venv environment. Does it work when you conda install rather than using pip?

You’ll also want to make sure pip is up to date. It’s not clear where you got it from in this install, but the one that is bundled with CPython 3.6 is old now. Again, as a conda environment, you may need to update it with conda to get the latest version.

I’d assume that both pip and conda are simply going to inherit permissions from the parent directory (or possibly your temp directory if something isn’t working correctly). Can you confirm whether any of the rest of your installation has limited permissions?