There is no module named BeautifulSoup (but it must be installed)

I downloaded BeautifulSoup.
Then I updated pip:

pip install --upprade pip

Then BS is installed:

pip install beautifulsoup4

Everything seems to be working fine, but now when I run these three lines of code:

from BeautifulSoup import BeautifulSoup
import urllib2
import csv

I get this error.

Traceback (last last call):
 file "C: \ Users \ rshuell001.spyder2 \ temp.py", line 1, from from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup

I am using Anaconda-Spyder

What am I doing wrong?

+6
source share
1 answer

I think it should be: from bs4 import BeautifulSoup.

+12
source

Source: https://habr.com/ru/post/1612804/


All Articles