On 02/19/2015 03:35 AM, ismaham...@gcuf.edu.pk wrote:
this is the error in the following python code, can any one help me
error{Traceback (most recent call last):
   File "C:\Python27\Scripts\BeOk\getBeOKExperts.py", line 6, in <module>
     from BeautifulSoup import BeautifulSoup
ImportError: No module named BeautifulSoup}



"#encoding=utf8
from codecs import open
from collections import defaultdict
import re

from BeautifulSoup import BeautifulSoup


When you can demonstrate a problem in a couple of lines of source code, why would you waste our bandwidth showing us dozens of unrelated lines?

Since the error says there's no module named BeautifulSoup, perhaps that's because you haven't installed BeautifulSoup. it's not in the standard library.

I've never used it, but a quick web search found me the page:

http://www.crummy.com/software/BeautifulSoup/bs4/doc/

And that seems to say the module is called bs4.

Anyway, if you did install it, and read the directions, and are still stumped, you probably need to supply many other details:

1) what version of Python are you using, and do you have multiple versions installed
2) what OS
3) where did you download it from, and what commands did you use to actually install it How did you specify which Python version it would install to?
4) what your import line looks like (which you did specify)
5) and of course, what the exception is (which you did include)

Other things people may need to know include what directory the bs4.pyc file is installed to, what your sys.path is, and so on. But just answering the first questions might let you figure it out for yourself.


--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to