I am trying to install the package underthesea-core==1.0.4
in my Python 3.12 environment, but I am encountering an error during installation. The error message indicates that the package fails to build the wheel, and the issue is caused by the missing maturin
module.
Here is the relevant error message I receive:
Using uv pip install.
Using Python 3.12.10 environment at /home/adminuser/venv[2025-04-22 16:27:01.729616]
Resolved 50 packages in 625ms
× Failed to download and build `underthesea-core==1.0.4`
╰─▶ Build backend failed to determine requirements with `build_wheel()`
(exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'maturin'
Checking if Streamlit is installed
Installing rich for an improved exception logging
Using uv pip install.
Using Python 3.12.10 environment at /home/adminuser/venv
I have the following dependencies in my requirements.txt
:
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
colorama==0.4.6
gitdb==4.0.12
GitPython==3.1.44
idna==3.10
Jinja2==3.1.6
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
MarkupSafe==3.0.2
maturin
narwhals==1.35.0
nltk==3.9.1
numpy==2.2.5
packaging==24.2
pandas==2.2.3
pillow==11.2.1
protobuf==5.29.4
pyarrow==19.0.1
pydeck==0.9.1
python-crfsuite==0.9.11
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
referencing==0.36.2
regex==2024.11.6
requests==2.32.3
rpds-py==0.24.0
scikit-learn==1.6.1
scipy==1.15.2
six==1.17.0
smmap==5.0.2
streamlit==1.44.1
tenacity==9.1.2
threadpoolctl==3.6.0
toml==0.10.2
tornado==6.4.2
tqdm==4.67.1
typing_extensions==4.13.2
tzdata==2025.2
underthesea==6.8.3
underthesea_core==1.0.4
urllib3==2.4.0
watchdog==6.0.0
The app works fine locally with Python 3.11, but when deployed on Streamlit Cloud, which is using Python 3.12, it fails. Is there any way to downgrade the Python version on Streamlit Cloud to 3.11 to avoid this issue?