I was trying to deploy my web app on Heroku and I was using the webbrowser
module to open a link when a button is clicked but the deployment failed with this error:
ERROR: Could not find a version that satisfies the requirement webbrowser (from -r/tmp/build_1a0f381f625ed056f039e4b30415d590/requirements.txt (line 7))
(from versions: none)
ERROR: No matching distribution found for webbrowser (from -r /tmp/build_1a0f381f625ed056f039e4b30415d590/requirements.txt (line 7))
! Push rejected, failed to compile Python app.
! Push failed
Here is the requirements.txt
file:
joblib>=0.14.0
numpy>=1.9.2
matplotlib>=1.4.3
pandas>=0.19
streamlit
scikit-learn==0.22.1
webbrowser
And here is how I use webbrowser
:
import webbrowser
webbrowser.open('URL')
When I deployed the app without mentioning webbrowser
in the requirements.txt
file the app was deployed successfully but the feature of opening the URL when the button is clicked was not working.