Src/app.py", line 4, in <module> from sentence_transformers import SentenceTransformer

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 121, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 593, in code_to_exec
    exec(code, module.__dict__)
  File "src/app.py", line 4, in <module>
    from sentence_transformers import SentenceTransformer
ModuleNotFoundError: No module named 'sentence_transformers'

He instalado mil veces la libreria esta y me funciona en local pero no en remoto, no se que podria hacer

Muchas gracias

Make sure sentence-transformers is installed in the cloud environment.

How can I check that because the only changes I am doing on VSC and deploy on github

Click on β€œManage app” during deployment to display the logs, you will see a detailed report of what is being installed.

Using uv pip install.
Using Python 3.9.21 environment at /home/adminuser/venv
Resolved 37 packages in 526ms
Prepared 37 packages in 1.82s
Installed 37 packages in 97ms
 + altair==5.5.0
 + attrs==25.3.0
 + blinker==1.9.0
 + cachetools==5.5.2
 + certifi==2025.1.31
 + charset-normalizer==3.4.1
 + click==8.1.8
 + gitdb==4.0.12
 + gitpython==3.1.44
 + idna==3.10
 + jinja2==3.1.6
 + jsonschema==4.23.0
 + jsonschema-specifications==2024.10.1[2025-03-14 12:24:37.739361] 
 + markupsafe==3.0.2
 + narwhals==1.30.0
 + numpy==2.0.2
 + packaging==24.2
 + pandas==2.2.3
 + pillow==11.1.0
 + protobuf==5.29.3
 + pyarrow==19.0.1
 + pydeck==0.9.1
 + python-dateutil==2.9.0.post0
 [2025-03-14 12:24:37.739577] + pytz==2025.1
 + referencing==0.36.2
 + requests==2.32.3
 + rpds-py==0.23.1
 + six==1.17.0
 + smmap==5.0.2
 + streamlit==1.43.2
 + tenacity==9.0.0
 + toml==0.10.2
 + tornado==6.4.2
 + typing-extensions==4.12.2
 + tzdata[2025-03-14 12:24:37.739784] ==2025.1
 + urllib3==2.3.0
 + watchdog==6.0.0

──────────────────────

I have this on my app in Github

streamlit==1.31.1

pandas==2.2.0

numpy==1.26.3

sentence-transformers==2.5.1

plotly==5.18.0

nltk==3.8.1

sqlalchemy==2.0.27

psycopg2-binary==2.9.9

beautifulsoup4==4.12.3

requests==2.31.0

googletrans==3.1.0a0

python-dotenv==1.0.1

streamlit-option-menu==0.3.12

torch

torchvision

torchaudio

do not know if this make sense

Thank you

You may have it in the wrong place. There is no attempt to install those packages.

1 Like