Question: I am trying to import BeautifulSoup in my python project but I am getting the error: Traceback (most recent call last): File C:UsersKristen AlbrechtOneDriveJoint DocumentsEducationUCLA

I am trying to import BeautifulSoup in my python project but I am getting the error:

Traceback (most recent call last): File "C:\Users\Kristen Albrecht\OneDrive\Joint Documents\Education\UCLA Applications Programing\Python\Week 7\KristenAlbrechtProject7\google.py", line 2, in import httplib2 ModuleNotFoundError: No module named 'httplib2'

I am using pydev in eclipse. and my file looks like this:

import urllib.request import BeautifulSoup

def main(): term = input('Enter a search term: ') url = 'http://www.google.com/search' value = {'q' : term} user_agent = 'Mozilla/5.0' headers = {'User-Agent' : user_agent} data = urllib.parse.urlencode(value) print(data) url = url + '?' + data print(url) req = urllib.request.Request(url, None, headers) response = urllib.request.urlopen(req) html = response.read() print(html) main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!