0

I am working on a project that requires retrieving information from a webpage. Since the webpage uses javascript redirects, my friend recommended I use mechanize in Python. (Can anyone confirm that mechanize can handle javascript redirects or suggest a better HTML parser?) Anyway, I installed easy_install through the Python script and then ran "easy_install mechanize" in the command prompt successfully. However, when I do:

import mechanize

I get the following error:

Unresolved import: mechanize

I read that it might be because I need to add my scripts folder to the environment path, which I think I have. As a beginner to HTML parsing I find the mechanize installation instructions and troubleshooting page really complicated so any help would be appreciated!

gion_13
  • 41,171
  • 10
  • 96
  • 108

1 Answers1

0

What version of python are you using? Are you running python in eclipse? It seems that the Unresolved import is an eclipse pydev error.

C R
  • 2,182
  • 5
  • 32
  • 41
  • yep, I am using Eclipse and I think Python 2.7 –  Oct 15 '13 at 13:13
  • I would guess that the problem is that eclipse can't find your python libraries. A quick work around is to edit the python script in eclipse but run it from the command line with python . – C R Oct 17 '13 at 23:24