I am trying to use BeautifulSoup, and despite using the import statement: 
from bs4 import BeautifulSoup
I am getting the error: ImportError: cannot import name BeautifulSoup
import bs4 does not give any errors.
I have also tried import bs4.BeautifulSoup and just importing bs4 and creating a BeautifulSoup object with: bs4.BeautifulSoup()
Any guidance would be appreciated.
I experienced a variation of this problem and am posting for others' benefit.
I named my Python example script bs4.py
Inside this script, whenever trying to import bs4 using the command:
from bs4 import BeautifulSoup, an ImportError was thrown, but confusingly (for me) the import worked perfectly from an interactive shell within the same venv environment.
After renaming the Python script, imports work as expected. The error was caused as Python tries to import itself from the local directory rather than using the system copy of bs4
Cannot import Beautiful Soup