Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Cannot import BeautifulSoup4 as bs4 and BeautifulSoup4 not in same directory
I have installed BeautifulSoup using pip command and installed successfully.
When I attempted to import it in Python; the following error appears.
>>> from bs4 import BeautifulSoup4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BeautifulSoup4' from 'bs4' (C:\Python37-64\lib\site-packages\bs4\

I checked my filemanager and see that bs4 and beautifulsoup4 are in separate directories.

I saw in another forum to combine both in the project folder I will be working on. But I haven't created any project yet. Just wanted to get Python set up correctly first.

It's from bs4 import BeautifulSoup
Take a look at Web-Scraping part-1, part2
metulburr likes this post

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  BeautifulSoup4, How to get an HTML tag with specific class. Broadsworde 6 1,132 Nov-22-2018, 05:25 PM
Last Post: snippsat
  How to use BeautifulSoup4 with pandas series type of html data? PrateekG 4 1,272 Apr-26-2018, 07:33 AM
Last Post: PrateekG
  What's a good practice project for learning BeautifulSoup4, which has a real use case league55 2 846 Jan-27-2018, 11:29 PM
Last Post: league55

Forum Jump:

Users browsing this thread: 1 Guest(s)