I'm following a tutorial on creating a map using Python and the Beautiful Soup library.
I have downloaded beautiful soup and the folder is called "beautifulsoup4-4.1.3". The contents of this folder are in the attached image.
During the tutorial I am given the following code to use to import my data and beautiful soup:
import csv
from BeautifulSoup import BeautifulSoup
Trouble is that there is no file called "beautiful soup" within the beautiful soup folder. I have also attached the error message I receive in the terminal.
How should I import beautiful soup when there is no file with that name? I tried simply changing the folders name to "beautiful soup". I did not expect that to work and I was right - it did not.
Any advice on how to proceed welcome?
解决方案
Either move the bs4 folder in the same directory as your script, or install the module via easy_install or pip. Then you can import it like this:
from bs4 import BeautifulSoup