0

I'm new with Python and I'm trying to use the BeautifulSoup 4.3.2 package but I get the next error:

Traceback (most recent call last):
  File "C:\Users\Name\Documents\NetBeansProjects\PythonPruebas\src\prueba.py", line 10, in <module>
       from bs4 import BeautifulSoup        
ImportError: No module named bs4

line 10 is:

from bs4 import BeautifulSoup
  • I have uninstalled and reinstalled it but it doesn't works.
  • I installed it using setup.py install.
  • I don't have other versions of python in my PC.
  • When I write the same line in IDLE (Python GUI), nothing happens I only get the error in NetBeans.
Drow
  • 1
  • 1

2 Answers2

0

You should install it like pip install BeautifulSoup4 , if you don't have pip installed, install it like it's written in this post (there are several workable solutions) How to install pip on windows?

Community
  • 1
  • 1
German Petrov
  • 1,347
  • 1
  • 14
  • 20
  • what is wrong with the answer? why down-vote? Please, explain. Is there the same error after `pip install BeautifulSoup4` ? – German Petrov Oct 10 '14 at 19:08
  • Hi, I don't know who down-vote your answer, it wasn't me. I have used pip and I get the same error. – Drow Oct 15 '14 at 13:34
0

Found answer here.

Error importing BeautifulSoup - Conflict with Python version

I had to change my import to "from bs4 import BeautifulSoup."

Community
  • 1
  • 1
Sedrick
  • 10,209
  • 3
  • 35
  • 49