Just installed BeautifulSoup Python 3.3.0

beautifulsoup, python, python-3.x

Solution

In Python 3 `print` is a function; it should be:

print(soup.prettify())

Install `bs4` correctly or use a newer version if it is a bug. `beautifulsoup4==4.1.3` works fine on Python 3.3.

Problem

Does anyone know how to fix it. I am using Mac OS 10.8.2 ``` >>> from bs4 import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/bs4/__init__.py", line 359 print soup.prettify() ^ SyntaxError: invalid syntax ```

Original source

Related problems