Hello,
My Streamlit app is failing to deploy with the error ModuleNotFoundError: No module named 'distutils'. This indicates the app is being built in a Python 3.12 environment.
To resolve this, I have taken the following steps, but the error persists:
- Added
setuptools>=65.5.0to myrequirements.txtto ensure modern packaging tools are used. - Added a
.python-versionfile to my repository containing3.11to explicitly force the app to build in a compatible Python environment. - Confirmed all files are correct in the public GitHub repository.
- Attempted to reboot, as well as fully delete and redeploy the app multiple times.
Despite these steps, the build log continues to show the distutils error, suggesting the .python-version file is not being respected by the build process.
Here is the link to my public GitHub repository:
Could you please advise on how to resolve this platform issue? Thank you.