Menu ▾ ▴

undeserved unresolved import

2009-05-19
2013-03-15
  • Okko Willeboordse

    Running python 2.6, Eclipse  3.3.2, Pydev 1.4.2 on Windows server 2003

    I installed configobject (http://pypi.python.org/pypi/ConfigObj/) using easy_install (easy_install ConfigObj).

    This results in one file being added to the python folder ie;
    C:\Python26\Lib\site-packages\configobj-4.6.0-py2.6.egg

    Now when I do;
    Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import configobj
    >>> configobj.__file__
    'C:\\python26\\lib\\site-packages\\configobj-4.6.0-py2.6.egg\\configobj.pyc'

    Apparently python retrieves the pyc file from the egg file.

    Pylint understands this also.

    pydev however not and gives;
    Unresolved import: configobj

    How do I make pydev understand this?

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2009-05-19

      If you want that library to be available for all your projects, you should add C:\Python26\Lib\site-packages\configobj-4.6.0-py2.6.egg in the interpreter configuration (window > preferences > pydev > interpreter - python) or if you only want it to be available for a given project, you should add it to your project pythonpath (project > properties > pydev - pythonpath > external libraries).

      Cheers,

      Fabio

       
      • Okko Willeboordse

        C:\Python26\Lib\site-packages\configobj-4.6.0-py2.6.egg is in the 'System PYTHONPATH' list in the interpreter configuration. That was done when adding the interpreter.

        However pydev still issues; Unresolved import: configobj

         
        • Fabio Zadrozny

          Fabio Zadrozny - 2009-05-20

          Can you report that as a bug? I have to see why that could be failing (and test it here to see if it works).

          Cheers,

          Fabio