Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 BeautifulSoup Installed but not Found in Atom
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:

Traceback (most recent call last): File "D:\A_ABlackOpalOps\WebScraperVersions\", 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 = ''
response = requests.get(url, timeout=5)
content = BeautifulSoup(response.content, "html.parser")

Thank you in advance.
Maybe you have different python installations or Atom is using a virtual environment in which bs4 is not installed.
(Jun-14-2019, 04:26 PM)ThomasL Wrote: Maybe you have different python installations or Atom is using a virtual environment in which bs4 is not installed.

Do you know how I can check if I have different python installations? I don't believe Atom is using a virtual environment. I only set up a single virtual environment within the project folder containing the files I'm building for the web scraping tool.

Thank you for the reply!
Unfortunately i don´t use Atom so i can´t help with that.
Btw which OS are you using?
(Jun-14-2019, 05:25 PM)wakegate Wrote: Do you know how I can check if I have different python installations
For windows as you use.
Command line cmd or better cmder:
λ python -V
Python 3.7.3

λ python -c "import sys;print(sys.executable)"

λ pip -V
pip 19.1.1 from c:\python\lib\site-packages\pip (python 3.7)
In code:
import sys

So as you see here python 3.7 is my main version in Windows environment Path.
It most natural that command line main version and Editor is set to same version.
Then can figure out how to use virtual environment and other version later.
Also py that get install,give easy access to other version.
λ py -3.6 -V
Python 3.6.4

λ py -3.4 -V
Python 3.4.2

λ py -2.7 -V
Python 2.7.9
Also look at VS Code from start,i did use Atom before but Vs Code dos a lot stuff better for Python.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Beautifulsoup Scraping PolskaYBZ 3 89 Jun-22-2019, 10:05 AM
Last Post: PolskaYBZ
  [Flask] No application found. SheeppOSU 1 168 Jun-01-2019, 02:58 PM
Last Post: SheeppOSU
  beautifulsoup error rudolphyaber 7 436 May-26-2019, 02:12 PM
Last Post: heiner55
  Looping with Beautifulsoup CaptainCsaba 8 435 Jan-23-2019, 12:38 PM
Last Post: buran
  Mechanize and BeautifulSoup read not correct hours vaeVictis 5 517 Jan-15-2019, 01:27 PM
Last Post: metulburr
  [split] [Help] Keep getting a 'TypeError' from Django and BeautifulSoup moxasya 0 335 Nov-15-2018, 07:38 AM
Last Post: moxasya
  BeautifulSoup n levels of nested xml elements fatwalletguy 1 530 Nov-08-2018, 12:23 AM
Last Post: Larz60+
  Help with python3 (BeautifulSoup) freaknez 1 541 Sep-14-2018, 09:50 PM
Last Post: Larz60+
  BeautifulSoup 'NoneType' object has no attribute 'text' bmccollum 9 2,560 Sep-14-2018, 12:56 PM
Last Post: bmccollum
  ImportError: cannot import name 'beautifulsoup' soothsayerpg 6 4,123 Jul-21-2018, 06:00 AM
Last Post: buran

Forum Jump:

Users browsing this thread: 1 Guest(s)