So this post: https://discuss.streamlit.io/t/secrets-at-build-time/32386
pointed to me that the only way to use private repository as a dependency in streamlit cloud deployment is to install it in my code directly. This is what I’ve done but I keep getting the following error:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: ‘/home/adminuser/venv/lib/python3.11/site-packages/websockets’
Full installation log here:
Installation log
Collecting git+https://****@github.com/Auto-SaaS/mindpulse_generation.git
Cloning https://****@github.com/Auto-SaaS/mindpulse_generation.git to /tmp/pip-req-build-hst20tg6
Running command git clone --filter=blob:none --quiet 'https://****@github.com/Auto-SaaS/mindpulse_generation.git' /tmp/pip-req-build-hst20tg6
Resolved https://****@github.com/Auto-SaaS/mindpulse_generation.git to commit c4bb4ca6b259b465de11feacb550d57d782d5b00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: openai==1.65.2 in /home/adminuser/venv/lib/python3.11/site-packages (from mindpulse_generation==0.1.1) (1.65.2)
Requirement already satisfied: anthropic==0.49.0 in /home/adminuser/venv/lib/python3.11/site-packages (from mindpulse_generation==0.1.1) (0.49.0)
Collecting google-genai==1.4.0 (from mindpulse_generation==0.1.1)
Using cached google_genai-1.4.0-py3-none-any.whl.metadata (29 kB)
Requirement already satisfied: loguru==0.7.3 in /home/adminuser/venv/lib/python3.11/site-packages (from mindpulse_generation==0.1.1) (0.7.3)
Collecting backoff==2.2.1 (from mindpulse_generation==0.1.1)
Using cached backoff-2.2.1-py3-none-any.whl.metadata (14 kB)
Requirement already satisfied: anyio<5,>=3.5.0 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (4.9.0)
Requirement already satisfied: distro<2,>=1.7.0 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (1.9.0)
Requirement already satisfied: httpx<1,>=0.23.0 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (0.28.1)
Requirement already satisfied: jiter<1,>=0.4.0 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (0.9.0)
Requirement already satisfied: pydantic<3,>=1.9.0 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (2.10.6)
Requirement already satisfied: sniffio in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (1.3.1)
Requirement already satisfied: typing-extensions<5,>=4.10 in /home/adminuser/venv/lib/python3.11/site-packages (from anthropic==0.49.0->mindpulse_generation==0.1.1) (4.12.2)
Collecting google-auth<3.0.0dev,>=2.14.1 (from google-genai==1.4.0->mindpulse_generation==0.1.1)
Using cached google_auth-2.38.0-py2.py3-none-any.whl.metadata (4.8 kB)
Requirement already satisfied: requests<3.0.0dev,>=2.28.1 in /home/adminuser/venv/lib/python3.11/site-packages (from google-genai==1.4.0->mindpulse_generation==0.1.1) (2.32.3)
Collecting websockets<15.0dev,>=13.0 (from google-genai==1.4.0->mindpulse_generation==0.1.1)
Using cached websockets-14.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)
Requirement already satisfied: tqdm>4 in /home/adminuser/venv/lib/python3.11/site-packages (from openai==1.65.2->mindpulse_generation==0.1.1) (4.67.1)
Requirement already satisfied: idna>=2.8 in /home/adminuser/venv/lib/python3.11/site-packages (from anyio<5,>=3.5.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (3.10)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/adminuser/venv/lib/python3.11/site-packages (from google-auth<3.0.0dev,>=2.14.1->google-genai==1.4.0->mindpulse_generation==0.1.1) (5.5.2)
Collecting pyasn1-modules>=0.2.1 (from google-auth<3.0.0dev,>=2.14.1->google-genai==1.4.0->mindpulse_generation==0.1.1)
Using cached pyasn1_modules-0.4.1-py3-none-any.whl.metadata (3.5 kB)
Collecting rsa<5,>=3.1.4 (from google-auth<3.0.0dev,>=2.14.1->google-genai==1.4.0->mindpulse_generation==0.1.1)
Using cached rsa-4.9-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: certifi in /home/adminuser/venv/lib/python3.11/site-packages (from httpx<1,>=0.23.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (2025.1.31)
Requirement already satisfied: httpcore==1.* in /home/adminuser/venv/lib/python3.11/site-packages (from httpx<1,>=0.23.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (1.0.7)
Requirement already satisfied: h11<0.15,>=0.13 in /home/adminuser/venv/lib/python3.11/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (0.14.0)
Requirement already satisfied: annotated-types>=0.6.0 in /home/adminuser/venv/lib/python3.11/site-packages (from pydantic<3,>=1.9.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (0.7.0)
Requirement already satisfied: pydantic-core==2.27.2 in /home/adminuser/venv/lib/python3.11/site-packages (from pydantic<3,>=1.9.0->anthropic==0.49.0->mindpulse_generation==0.1.1) (2.27.2)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/adminuser/venv/lib/python3.11/site-packages (from requests<3.0.0dev,>=2.28.1->google-genai==1.4.0->mindpulse_generation==0.1.1) (3.4.1)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/adminuser/venv/lib/python3.11/site-packages (from requests<3.0.0dev,>=2.28.1->google-genai==1.4.0->mindpulse_generation==0.1.1) (2.3.0)
Collecting pyasn1<0.7.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth<3.0.0dev,>=2.14.1->google-genai==1.4.0->mindpulse_generation==0.1.1)
Using cached pyasn1-0.6.1-py3-none-any.whl.metadata (8.4 kB)
Using cached backoff-2.2.1-py3-none-any.whl (15 kB)
Using cached google_genai-1.4.0-py3-none-any.whl (140 kB)
Using cached google_auth-2.38.0-py2.py3-none-any.whl (210 kB)
Using cached websockets-14.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (169 kB)
Using cached pyasn1_modules-0.4.1-py3-none-any.whl (181 kB)
Using cached rsa-4.9-py3-none-any.whl (34 kB)
Using cached pyasn1-0.6.1-py3-none-any.whl (83 kB)
Building wheels for collected packages: mindpulse_generation
Building wheel for mindpulse_generation (pyproject.toml): started
Building wheel for mindpulse_generation (pyproject.toml): finished with status 'done'
Created wheel for mindpulse_generation: filename=mindpulse_generation-0.1.1-py3-none-any.whl size=6154 sha256=3f3aa61f4167a3b5979eb4d26218eeceeef4520f9a81fd6bfa2c39c5ede870e9
Stored in directory: /tmp/pip-ephem-wheel-cache-np3j5ud4/wheels/1c/8c/b1/c3b36b3c61cebf999880da74844751ec403e502e0d8775ddff
Successfully built mindpulse_generation
Installing collected packages: websockets, pyasn1, backoff, rsa, pyasn1-modules, google-auth, google-genai, mindpulse_generation
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/home/adminuser/venv/lib/python3.11/site-packages/websockets'
Check the permissions.
[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
The dependencies of the lib I’m trying to install are as follows:
openai==1.65.2
anthropic==0.49.0
google-genai==1.4.0
loguru==0.7.3
backoff==2.2.1
How should I install it, for it to work on streamlit cloud?