Import BeautifulSoup
import bs4.BeautifulSoup will work when we have another file like thing in your bs4 package however BeautifulSoup is a class from that package so it cannot be called the way you are calling it.
Example I have a package name Twitter and there is a sub package called twitter-api then I can call it as import Twitter.twitter.api
Similarly, if I have package name Twitter and there is a class inside that package with name twitter-api then I have to call it from Twitter import twitter-api
To my understanding "import package.module" is same as "from package import module". But this is not behaving as expected in case of BeautifulSoup. 
from bs4 import BeautifulSoup: This command works fine.
But,
import bs4.BeautifulSoup throws the following error
ModuleNotFoundError: No module named 'bs4.BeautifulSoup'
Any thoughts/help on this?