1

尝试使用 python 3.3.2 安装 beautifulsoup4-4.1.3 -

 $ sudo /usr/bin/Python-3.3.2/python ./setup.py install
    running install
    running build
    running build_py
    running install_lib
    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/element.py to element.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/element.py", line 1200
        print 'Running CSS selector "%s"' % selector
                                        ^
    SyntaxError: invalid syntax

    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/tests/test_html5lib.py to test_html5lib.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/tests/test_html5lib.py", line 8
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax

    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/tests/test_lxml.py to test_lxml.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/tests/test_lxml.py", line 11
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax

    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/tests/test_soup.py to test_soup.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/tests/test_soup.py", line 28
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax

    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/__init__.py to __init__.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/__init__.py", line 365
        print soup.prettify()
                 ^
    SyntaxError: invalid syntax

    byte-compiling /opt/python3/lib/python3.3/site-packages/bs4/builder/_htmlparser.py to _htmlparser.cpython-33.pyc
      File "/opt/python3/lib/python3.3/site-packages/bs4/builder/_htmlparser.py", line 68
        except (ValueError, OverflowError), e:
                                          ^
    SyntaxError: invalid syntax

    running install_egg_info
    Removing /opt/python3/lib/python3.3/site-packages/beautifulsoup4-4.1.3-py3.3.egg-info
    Writing /opt/python3/lib/python3.3/site-packages/beautifulsoup4-4.1.3-py3.3.egg-info
4

0 回答 0