Bash can't find python library but pydev can
Question: I am trying to write some script using Python DNS library (dnspython). I
installed it (python-dns and python-dnspython) using packet manager (apt-get
install).

I was trying to write the script interactively on the shell, but it keeps
saying that it can't find the library.

    
    
    >>> import dns
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named dns
    

The funny part is, when I make the same import on Eclipse (pydev) it has no
problem placing it. It must be something I do wrong, like not defining the
path etc (although this one isn't very likely, since -as far as I know- apt-
get is supposed to handle it automatically).

OS: Ubuntu 12.04 Python version: 2.7.3

I am a beginner on Linux and on Python (bad combination, I know). Any help
will be appreciated. Thanks in advance!


Answer: Try this in both environments to see what the difference is:

    
    
    import sys
    print sys.path
    

