BeautifulSoup for MacOS
- nalatty80
- Nov 8, 2022
- 1 min read
In the process of learning Python 3, I encountered a problem in one of the tasks: BeautifulSoup (a Python library for extracting data from HTML and XML files) did not work correctly or did not start at all.
I downloaded some zip archives, threw them into a working folder, etc. The code did not work. It gave me endless errors.
Many attempts to find the right solution led to the only (in my case) correct one.
I share it here.
So, first you need to check the version of Python and Pip installed on your machine through the terminal:
python3 --version
pip3 --version

If you have fresh enough Python 3 and Pip 3 (they do not need to be updated), install a BeautifulSoup to your machine:
pip3 install beautifulsoup4

That's all. If there are recommendations for updating in the terminal, update and code.
PS: This is a recommendation only for the latest MacOS.
Comments