0

This might be a super newbie question but I am trying to import BeautifulSoup to my python project:

import urllib.request
from bs4 import BeautifulSoup

but I am getting this error:

import BeautifulSoup
ModuleNotFoundError: No module named 'BeautifulSoup'

From what I am reading I have to install it make a child folder for it? If so why do my other imports such as import urllib.request work without installation and this one doesn't?

Kris
  • 327
  • 5
  • 16
  • Have you tried `pip install beautifulsoup4`? Beautiful Soup is an external module whereas urllib is from the standard library of Python, so you don't have to install it. – mgul May 22 '18 at 15:19
  • Did you pip install beautifulsoup4 from the command line? See the accepted answer to [this question](https://stackoverflow.com/questions/19957194/install-beautiful-soup-using-pip) – Watty62 May 22 '18 at 15:20

1 Answers1

1

Python comes with a default set of modules - you can see that urllib is included with your installation of Python by looking at the list of default modules on this page.

You should follow these instructions to download and use pip, the Python package manager and installer, to get and install the BeautifulSoup module.

Adil B
  • 14,635
  • 11
  • 60
  • 78