Menu

#1388 Pydev mixes python 2.6 and 2.7 modules

pending
debugger (210)
5
2011-09-15
2011-09-14
No

When running the pydev debugger I get python 2.6 and 2.7 libraries in my sys.path. The following shows the relevant trace:

# /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.pyc matches /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py
import abc # precompiled from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.pyc
# /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.pyc matches /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.pyc
dlopen("/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_weakref.so", 2);
import _weakref # dynamically loaded from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_weakref.so
'import site' failed; traceback:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 62, in <module>
import os
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 398, in <module>
import UserDict
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 84, in <module>
_abcoll.MutableMapping.register(IterableUserDict)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py", line 109, in register
if issubclass(subclass, cls):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py", line 184, in __subclasscheck__
cls._abc_negative_cache.add(subclass)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_weakrefset.py", line 84, in add
self.data.add(ref(item, self._remove))
TypeError: cannot create weak reference to 'classobj' object

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2011-09-15

    Probably you have the PYTHONHOME or PYTHONROOT configured (so, Python will override the PyDev settings in that case).

    Another possibility is that the interpreter configuraton has mixed paths.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-09-15
    • status: open --> pending
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.