1

I am doing a python webpage scraper .

Some tutorial told me to use this package: BeautifulSoup. So I installed it using pip.

Then, in my script, I try to import BeautifulSoup as bs. But I was warned that no module named BeautifulSoup.

Is there a reliable way to get module name out of an installed package?

modeller
  • 3,770
  • 3
  • 25
  • 49
  • 2
    I'd imagine somewhere further down the tutorial they show you how to import and use it; e.g. https://www.crummy.com/software/BeautifulSoup/bs4/doc/. In the general case, I think this duplicates http://stackoverflow.com/q/7184375/3001761. – jonrsharpe May 21 '17 at 19:26
  • @jonrsharpe sorry for using this space for a question, but since you are a more experienced SO user, why posting this as a comment and not an answer? It seems `from bs4 import BeautifulSoup` is really what OP wants. – Vinícius Figueiredo May 21 '17 at 19:29
  • 2
    @ViníciusAguiar because their *actual question* is *"Is there a reliable way to get module name out of an installed package?"*, but I've run out of votes to close as a dupe. – jonrsharpe May 21 '17 at 19:30
  • @jonrsharpe oh, I see, thanks. Yeah, it really seems a duplicate judging by the title. – Vinícius Figueiredo May 21 '17 at 19:34

1 Answers1

-1

Try this from bs4 import BeautifulSoup

Edit: Was already answered by @jonsharpe and @Vinícius Aguiar in the comments under the question.

David
  • 65
  • 2
  • 11