0

I recently downloaded and installed feedparser with python, I tried to run it but Netbeans shouts on import: ImportError: No module named feedparser

restarted the Netbeans, still no go.

Asaf
  • 8,106
  • 19
  • 66
  • 116
  • can you import it in a python shell? – joaquin May 17 '10 at 20:06
  • Yes, and in fact when I open Netbeans>Window>PythonConsole and try to import feedparser I get http://pastebin.com/fwcbauNt – Asaf May 17 '10 at 20:19
  • so to clarify, you can import it in the python shell with no errors, and just not in Netbeans? – Matt Boehm May 17 '10 at 21:08
  • 1
    Problem solved, turns out Netbeans uses Jython by default after you install the Python plugin, strange but fixable :) – Asaf May 18 '10 at 10:39

2 Answers2

1

Netbeans by default uses Jython,
if you go to Tools>Python Platforms and see that Jython is the default.
Switch it to Python and so the installed libraries would work.
If you already have a project, you should right click on it,
choose Python and on the platform choose Python instead of Jython.

Asaf
  • 8,106
  • 19
  • 66
  • 116
0

You might need to set the PYTHONPATH environment variable to include the install path of feedparser. Just a guess, but this has fixed this issue in the past for me.

Matt Boehm
  • 1,894
  • 1
  • 18
  • 21