Error importing BS4 with Python 3.6 on Mac

65 views
Skip to first unread message

mcw

unread,
Apr 6, 2017, 9:01:55 AM4/6/17
to beautifulsoup

Hi, how are you? Please, i need your help, Thanks a lot.


I installed Python 3.6 and BS4 successfully, but when i try to import BS4 with Python 3.6 in the Terminal (import BS4), appears the following error:


Williams-MacBook-Pro:beautifulsoup mcw$ python3

Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) 

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> from bs4 import beautifulsoup

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Users/mcw/Desktop/beautifulsoup/bs4/__init__.py", line 53

    'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'

Reply all
Reply to author
Forward
0 new messages