pydev issue with gobject

巧了我就是萌 提交于 2019-12-11 08:54:33

问题


It seems that Pydev (1.5.4) on Eclipse (3.5.1) with Python 2.6 isn't able to correctly cross-reference the package gobject. Putting import gobject works OK but any more than that (e.g. class X(gobject.GObject) causes Pydev to report "unresolved reference" errors.

What could be the problem?

Note that every other package I use doesn't trigger this error.


回答1:


The issue is related to this limitation of PyDev:

I have a library installed and Pydev does not find it

Well, problems have been reported on Mac and Linux, and the main reason seems to be symlinks. Pydev will only find extensions that are 'really' below the python install directory. This happens because the 'less common denominator', which in this case is windows, does not have symlinks. A workaround to this problem includes manually adding the given folder installation to the pythonpath or changing the installation of the package to be under the site-packages folder.

To adjust for this limitation, find the absolute path to the library and update the libraries associated with the interpreter for Pydev.



来源:https://stackoverflow.com/questions/2106349/pydev-issue-with-gobject

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!