Jun-14-2019, 03:32 PM
Hey everyone, I read a few other threads related to this, but was not able to solve my problem. I'm attempting to write a very simple web scraper in Atom using Python. I added python successfully to my computers Path directory (and checked that it is retrieved within the command line), created and activated a virtual environment within my project folder, and have checked within the command line that beautifulsoup is indeed installed AND upgraded (at least for the virtual environment, as far as I'm aware). However, when I try to run my code within the Atom application, I receive the following error:
Error:Traceback (most recent call last):
File "D:\A_ABlackOpalOps\WebScraperVersions\webScraperv1.py", line 1, in <module>
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'
I tested a simple python script within Atom to simply print 'Hello' and it worked, so I'm unsure as to why Atom cannot find bs4. Here is my code for the webscraper:from bs4 import BeautifulSoup import requests url = 'http://ethans_fake_twitter_site.surge.sh/' response = requests.get(url, timeout=5) content = BeautifulSoup(response.content, "html.parser") print(content)Thank you in advance.