ERROR: Could not find a version that satisfies the requirement BeautifulSoup (from versions: 3.2.0, 3.2.1, 3.2.2)
ERROR: No matching distribution found for BeautifulSoup
[client] Spinning up manager process...
[manager] installer returned a non-zero exit code
[manager] Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
I am pretty sure that bs4 don’t stand for beautifulsoup4 because when I test it I get this on my computer: ModuleNotFoundError: No module named ‘beautifulsoup4’
Does anybody already face this problem with bs4 ? And how to translate the sentence “from bs4 import BeautifulSoup” from my script to the requirements files ?
It seems that bs4 is the 4th version of BeautifulSoup, and it is recommended to use the newer version when coding these days.
In the “Installing Beautiful Soup” section:
“The BeautifulSoup package is not what you want. That’s the previous major release, Beautiful Soup 3. Lots of software uses BS3, so it’s still available, but if you’re writing new code you should install beautifulsoup4 .)”
I don’t know all the subtle differences between the packages, but I suppose the easiest would be to change your requirements to use the newest version by adding beautifulsoup4 as the package.
Any reason you’re not using the most up-to-date version of BeautifulSoup?
To answer your question, on my computer, the version of beautifulsoup is the 4.9.0. I put it in the requirements files when I tried to deploy my app.
Looking at the documentation, it seems like I’m usigng BeautifulSoup the right way, I must miss something.
In my scripts I have the line “from bs4 import BeautifulSoup” as they do in the link you send me and in my requirements file I have this line : beautifulsoup4==4.9.0
I did a few tests, line by line on my app and she looks to stop the calculation when she encounter this line : soup = BeautifulSoup(r_html,‘html.parser’)
A really common line in scraping with python.
I might need to do something different for the two tables using this method.
Could there be any scraping limitation and forbidden websites while an app is deployed on streamlit ?
The requirements files didn’t change but while I haven’t found a solution for scrapping the table I need, I slightly change the code of the app. The instructions that are usually scraping are in comments in the file Services/stats_joueurs.py