Q:

error "no module named bs4"

"ImportError: No module named bs4" this error comes every time i run the code. even trying "pip install beautifulSoup4" does not solve the problem.by the way pip does work by itself.
This is the code I am trying to run:
from bs4 import BeautifulSoup

import requests

url = raw_input("Enter a website to extract the URL's from: ")

r = requests.get("http://"+url)
data = r.text

soup = BeautifulSoup(data)

for link in soup.find_all('a'):
    print(link.get('href'))

When I try to install beautifulsoup, it hangs after this command:

A:

Check your current version of pip using pip -V
If you are not using latest version, upgrade your pip.
Before installing try pip search <Package Name>
Better to install anaconda, no need to install all the libraries manually as they already come with anaconda.
Here's the link: https://www.continuum.io/downloads 

