PermissionError: [Errno 13] Permission denied: '/home/adminuser/venv/lib/python3.9/site-packages/llama_index/readers/llamahub_modules'

My app ArxivGPT works perfectly as a localhos and a few weeks before was working also on Streamlit platform. Now, when I run it on Streamlit platform I get the following error:

PermissionError: [Errno 13] Permission denied: ‘/home/adminuser/venv/lib/python3.9/site-packages/llama_index/readers/llamahub_modules’


File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 552, in _run_script
    exec(code, module.__dict__)File "/mount/src/arxivchabot_streamlit_updated/", line 24, in <module>
    ArxivReader= download_loader("ArxivReader")File "/home/adminuser/venv/lib/python3.9/site-packages/llama_index/readers/", line 117, in download_loader
    os.makedirs(dirpath)File "/usr/local/lib/python3.9/", line 225, in makedirs
    mkdir(name, mode)

On the Streamlit platfrom:
When I comment the line code: ArxivReader= download_loader(“ArxivReader”)
it seem thes page loads properly but of course the chat GPT does not work properly since
I need this line.


I am using python3.9.

Requriements file content

If you have any clue, please let me know! thanks in advance!

Hi @Ilias_Amanatidis

It seems that your app files are distributed in several separate files. Have you confirmed that the main app file is able to access (and have file permission access) those separate files.

If not, perhaps you can explore if the path is causing the error (more info on this here)

I’m getting this same Error aswell.

PermissionError: [Errno 13] Permission denied: ‘/home/adminuser/venv/lib/python3.9/site-packages/.env’

App was working previously. Obviously something was changed causing this error.

1 Like

I agree with you! My app was working also prevously!

Hi man!

Thank you for your reply! My app more specifically creates a folder and all the files are downloaded there. I have tested my app locally and seemed to worked perfect.

Running into the same issue. Using PynamoDb. Everything works on local, but then I get the following error on Streamlit Cloud. I tried locking urllib3 to 2.0.4 on my side, but then all hell breaks loose.

WARNING: You are using pip version 22.0.3; however, version 23.2.1 is available.
You should consider upgrading via the '/home/adminuser/venv/bin/python -m pip install --upgrade pip' command.
Processing /tmp/tmp6pww3wdr/apps/private_package
  Preparing metadata ( started
  Preparing metadata ( finished with status 'done'
Collecting pynamodb==5.5.0
  Using cached pynamodb-5.5.0-py3-none-any.whl (60 kB)
Collecting botocore>=1.12.54
  Using cached botocore-1.31.29-py3-none-any.whl (11.1 MB)
Collecting jmespath<2.0.0,>=0.7.1
  Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/adminuser/venv/lib/python3.9/site-packages (from botocore>=1.12.54->pynamodb==5.5.0->private-package==0.1.0) (2.8.2)
Collecting urllib3<1.27,>=1.25.4
  Using cached urllib3-1.26.16-py2.py3-none-any.whl (143 kB)
Requirement already satisfied: six>=1.5 in /home/adminuser/venv/lib/python3.9/site-packages (from python-dateutil<3.0.0,>=2.1->botocore>=1.12.54->pynamodb==5.5.0->private-package==0.1.0) (1.16.0)
Building wheels for collected packages: private-package
  Building wheel for private-package ( started
  Building wheel for private-package ( finished with status 'done'
  Created wheel for private-package: filename=provate_package-0.1.0-py3-none-any.whl size=8761 sha256=3bfa7d425be621b29cee023e0e2edde0a9cffb1469690af8cdf6400826a04de2
  Stored in directory: /tmp/pip-ephem-wheel-cache-9ckof8ka/wheels/9e/6f/7e/f4ed7ffe1fe3c46f3d7366f2706abde501fbd95b48b58a94c8
Successfully built private-package
Installing collected packages: urllib3, jmespath, botocore, pynamodb, private-package
  Attempting uninstall: urllib3
    Found existing installation: urllib3 2.0.4
    Uninstalling urllib3-2.0.4:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'WHEEL'
Check the permissions.

I am getting the same error when trying to deploy a streamlit app that installs a private package using the subprocess prescription.

It is true that in the private repo, I had reference to a local file and was using the os module to resolve the absolute path. I refactored that bit off and now there is no os.path reference in my private repo code but the error persists. Any ideas on how to at least troubleshoot?

I should add that the private repo is managed using poetry with dependency management through a poetry.lock and pyproject.toml files

Still an issue. Running fine locally but not here. I presume the uber smart streamlit devops peeps are interfering with users and permissions so this regression should be fixed asap imo.