出现问题:Command "python setup.py egg_info" failed with error code 1,当进行pip3 install beautifulsoup

C:\Users\wang>pip3 install beautifulsoup
Collecting beautifulsoup
  Using cached BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\wang\AppData\Local\Temp\pip-build-3s2h_rej\beautifulsoup\se
tup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int
"Unit tests have failed!")?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\wang\App
Data\Local\Temp\pip-build-3s2h_rej\beautifulsoup\

beautifulsoup中的内容支持python2,不支持python3。 
解决方案:安装beautifulsoup4

C:\Users\wang>pip install bs4

 

    原文作者:FeliciaWon
    原文地址: https://www.cnblogs.com/feliciawon/p/8458043.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞