Error: Python stdlib not found - macosx

  • Gabriel M. Elder

    0) PyDev rocks; thank you (I intend to donate very soon).

    1) My problem - I saw there's a related thread from tim-erwin, started about a week ago. But my situation is a little different, and I suspect this problem could be fairly widespread. My development machine is running macosx v10.5.8, btw.

    In the past, I have been able to remove the configured python interpreter from the eclipse -> pydev preferences, and then re-add it using the auto config button / tool. I've had to do this to fix unresolved import errors (even tho the module(s) in question were handily importable using the interactive interpreter in a bash shell, but that's another story), and up until the most recent attempt to do this a few weeks ago, this has worked without any hiccups.

    Now, the auto config seems to find all the standard macosx python library framework folders (plus the wxpython ones I installed), presenting a dialog box showing the automatically generated list, with their selectable checkboxes. No matter what combination of folders I do or do not select here, I get the aforementioned error message after clicking the OK button. It won't let me add the interpreter and set the PYTHONPATH with the folders that it is finding; this is bad.

    Troubleshooting steps taken thus far:

    This is not due to an eclipse / pydev configuration or preference that is specific to my user profile, as it also happens when I log in as a different user, and try to configure the interpreter in pydev.

    I uninstalled the eclipse galileo version that I was running when the problem first started, and then downloaded and installed the eclipse ide for java developers, 32-bit helios v3.6.2, followed by cdt (enabled the built-in repo) and then pydev (via the eclipse marketplace). No change after this.

    Taking the hint from the error message that it was looking for the .py stdlib files, I searched the hard drive and python framework folders. The /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 folder contains no .py files; just .pyc and .pyo files.

    What I find particularly odd about this happening now is that it appears that all the library / framework .py files were never present from the start (afaik). And I certainly wouldn't have deleted them, if they had been present. Perhaps some recent system update removed or compiled the .py files?

    In short, why would pydev be insisting that the python stdlib .py files be present now, even though I've been using pydev for the past two years? Until recently, I've had no problems using the interpreter auto config, especially to have it re-detect standard libraries to correct unresolved import errors for modules that were clearly already present on the system.

    I don't want to download and install the mac-specific python distributions from the python foundation (if this can be avoided), as the target machines for my python development projects will, by default, only have the official python framework provided by the OS vendor (i.e. apple). The lack of wxpython by default on these machines is bad enough.

    Sorry so verbose, but I didn't want to omit any possibly relevant info. Help would be greatly appreciated at this point. The interpreter and framework are functionally present, and I don't know if it's a bug in pydev or eclipse that's preventing me from being able to use it like it was working before, or what. I'd really like to get back to using pydev for my development projects.

    thanks in advance,
    - gabriel

  • Fabio Zadrozny

    Fabio Zadrozny - 2011-04-21

    This is a new checking in the latest version (previously as you saw, that was possible).

    The problem is that PyDev expects those .py files to be there and not having them can mean you'll have some issues (especially in code-completion/code analysis) when using it.

    So, you can still use the default install you have on Mac OS, but you have to get the corresponding .py files from a install and copy them to your install (the files under the /Lib folder), or use a Python install from  (don't really know why Mac OS doesn't distribute the .py files together as it's free/open source).

    Personally, I always use installs from, so that there's no chance of breaking the default install in the OS (especially when adding other dependencies I need)…




Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks