python - beautifulsoup4 installation & import using python3 on mac -


i going crazy installation of beautifulsoup4 on macbook on have python 3.x installed.

i managed install beautifulsoup typing "python3 setup.py install" in console. after going through code console tells me

installed /library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/beautifulsoup4-4.4.0-py3.5.egg processing dependencies beautifulsoup4==4.4.0 finished processing dependencies beautifulsoup4==4.4.0 patriks-macbook-pro:beautifulsoup4-4.4.0 patrik$ 

but when run "import bs4" in python, keeps telling me

import bs4   file "<frozen importlib._bootstrap>", line 2205, in _find_and_load   file "<frozen importlib._bootstrap>", line 2190, in _find_and_load_unlocked   file "<frozen importlib._bootstrap>", line 2132, in _find_spec   file "<frozen importlib._bootstrap>", line 1908, in find_spec   file "<frozen importlib._bootstrap>", line 1884, in _get_spec   file "<frozen importlib._bootstrap>", line 1865, in _legacy_get_spec   file "<frozen importlib._bootstrap>", line 864, in spec_from_loader   file "<frozen importlib._bootstrap>", line 905, in spec_from_file_location   file "/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/beautifulsoup4-4.4.0-py3.5.egg/bs4/__init__.py", line 48     'you trying run python 2 version of beautiful soup under python 3. not work.'<>'you need convert code, either installing (`python setup.py install`) or running 2to3 (`2to3 -w bs4`).'                                                                                                        ^ syntaxerror: invalid syntax 

but far can see installed 4..4.0 version of beautifulsoup4.

there seem lot of people how seeking short clear noobie-tutorial how install bs4 in python 3.x on mac os 10.x

hopefully can out...

actually pip3 install beautifulsoup produces strange error me:

collecting beautifulsoup   downloading beautifulsoup-3.2.1.tar.gz     complete output command python setup.py egg_info:     traceback (most recent call last):       file "<string>", line 20, in <module>       file "/private/tmp/pip-build-prl0vx3e/beautifulsoup/setup.py", line 22         print "unit tests have failed!"                                       ^     syntaxerror: missing parentheses in call 'print' 

but sudo pip3 install beautifulsoup4 works!


Comments