“单元测试失败".为了美丽的汤 [英] "unit tests have failed" for beautifulsoup
本文介绍了“单元测试失败".为了美丽的汤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为python33安装beautifulsoup,但安装不正确,它会给出如下错误:
i am trying to install beautifulsoup for python33 but its not installing properly it gives error like that:
C:\Python33>pip install beautifulsoup
Downloading/unpacking beautifulsoup
Downloading BeautifulSoup-3.2.1.tar.gz
Running setup.py egg_info for package beautifulsoup
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\windows\temp\pip_build_Prashant\beautifulsoup\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\windows\temp\pip_build_Prashant\beautifulsoup\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: invalid syntax
那么我该怎么办,有人可以建议我吗?
so what can i do for this error,can anybody suggest me?
推荐答案
您正在尝试安装与Python 3不兼容的BeautifulSoup 3.安装 beautifulsoup4
代替:
You are trying to install BeautifulSoup 3, which is not Python 3 compatible. Install beautifulsoup4
instead:
pip install beautifulsoup4
大多数假定BeautifulSoup 3的代码也将与BeautifulSoup 4一起使用.对于新项目,只需坚持使用BS4.
Most code that assumes BeautifulSoup 3 will also work with BeautifulSoup 4. For new projects, just stick with BS4.
这篇关于“单元测试失败".为了美丽的汤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文