ModuleNotFoundError: No module named 'bs4'

I'm still super new to coding! Trying to learn from online tutorials, but I seem to be stuck with the first step! I think I have installed bs4 but it doesn't show up in python3, is it installed in the wrong place?

robbie$ sudo -H pip install bs4
Requirement already satisfied: bs4 in /Library/Python/2.7/site-packages
Requirement already satisfied: beautifulsoup4 in /Library/Python/2.7/site-packages (from bs4)
Robbies-MBP:~ robbie$ 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.
>>> import bs4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bs4'

      

Any help would be greatly appreciated :)

+3


source to share


1 answer


Requirement already met: bs4 in / Library / Python / 2.7 / site-packages

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

You have a module for Python 2.7 installed, however you are using and trying import

with Python 3.6.



You must use pip3

how you use python3

.

+7


source







All Articles