I’m learning Python3 and am trying to run a Python script that Dr. Serverence has in a file called urllinks,py. It wants me to import it, but it keeps erroring out. I checked and the large text below shows that it is installed in Python. I cannot find an email or a link to contact him, the only one I found is on Twitter, and it won’t take a message. I’ve tried his
install proceedue and it hasn’t helped. I’m pretty computer literate, but I’m out of ideas… Please help
The file:
File “C:\py\freecodecamp\urllinks.py”, line 6, in
The part of the script making the request:
import urllib.request, urllib.parse, urllib.error
import BeautifulSoup # ( I even tried lower case beautifulsoup and adding a 4 at the end)
The error code I get:
Traceback (most recent call last):
import urllib.request, urllib.parse, urllib.error
File “C:\py\freecodecamp\urllinks.py”, line 6, in
import BeautifulSoup
ModuleNotFoundError: No module named ‘BeautifulSoup’
Feedback from the command line telling me that beautifulsoup4 is already installed:
:\Users\tom>pip install beautifulsoup4
Requirement already satisfied: beautifulsoup4 in c:\users\tom\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (4.9.3)
Requirement already satisfied: soupsieve>1.2 in c:\users\tom\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from beautifulsoup4) (2.1)