Just installed BeautifulSoup Python 3.3.0

后端 未结 3 893
轻奢々
轻奢々 2020-12-21 10:03

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 \"         


        
3条回答
  •  隐瞒了意图╮
    2020-12-21 10:28

    Beautiful Soup 4 works on both Python 2 (2.6+) and Python 3.

    Beautiful Soup is licensed under the MIT license, so you can also download the tarball, drop the bs4/ directory into almost any Python application (or into your library path) and start using it immediately. If you want to do this under Python 3, you will need to manually convert the code using 2to3.

    http://www.crummy.com/software/BeautifulSoup/

    use python ../python33/Tools/Script/2to3.py -w beautifulsoup4-4.3.2 is be ok

提交回复
热议问题