Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"unit tests have failed" for 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?

like image 725
Prush Avatar asked Mar 10 '14 13:03

Prush


1 Answers

You are trying to install BeautifulSoup 3, which is not Python 3 compatible. Install beautifulsoup4 instead:

pip install beautifulsoup4

Most code that assumes BeautifulSoup 3 will also work with BeautifulSoup 4. For new projects, just stick with BS4.

like image 87
Martijn Pieters Avatar answered Nov 03 '22 04:11

Martijn Pieters