Python Forum
having a problem in importing module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
having a problem in importing module
#1
import beautifulsoup

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import beautifulsoup
ImportError: No module named beautifulsoup
I installed beautiful soup using pip successfully..
But when I try to import it, an error(Import error) appears..
Please help me to fix this.
Reply
#2
you need to import bs4 and will use bs4.BeautifulSoup

or better directly
from bs4 import BeautifulSoup
and then just reference BeautifulSoup

here is the documentation https://www.crummy.com/software/BeautifulSoup/bs4/doc/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Importing created module for web scraping with bs4 Truman 5 3,482 Sep-08-2018, 06:32 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020