Pru*_*ush 21 python beautifulsoup python-3.x
我正在尝试为python33安装beautifulsoup但它没有正确安装它给出了这样的错误:
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
Run Code Online (Sandbox Code Playgroud)
那么我能为这个错误做些什么,有人能建议我吗?
Mar*_*ers 48
您正在尝试安装BeautifulSoup 3,它不兼容Python 3.安装beautifulsoup4:
pip install beautifulsoup4
Run Code Online (Sandbox Code Playgroud)
大多数假设BeautifulSoup 3的代码也适用于BeautifulSoup 4.对于新项目,只需坚持使用BS4.
| 归档时间: |
|
| 查看次数: |
13208 次 |
| 最近记录: |