如何在Eclipse中添加PIL到PyDev,所以我可以导入它并在我的项目中使用它? [英] How do I add PIL to PyDev in Eclipse, so i could import it and use it in my project?
问题描述
我重新启动了日食,但是当我尝试从PIL导入图像中做我得到:未解决进口。
任何一个请帮助我在这里,所有其他包,我使用到现在工作的一样的方式....我真的需要使用PIL
这里有同样的问题。
通过将 / usr / share / pyshared
添加到window-> preferences-> pydev-> Interpreter - Python中的Libraries选项卡来解决。
有很多 / usr / lib / python *
路径与编译的库(C的东西与python绑定)在哪里已经包含,但不包含 / usr / share
...与源的零件。
I am trying to work with PIL in my project but the pydev can't seem to find it in my project. First of all I can see it when I enter the python shell, I can import it and I see it in the python sys.path. Second, I Added it to the PYTHONPATH in eclipse.
I restarted eclipse, but still, when I try to do "from PIL import Image" I am getting: "unresolved import".
Can any one please help me here, all other packages I used until now worked great the same way.... and i really need to use PIL
Had the same problem here.
Got it resolved by adding /usr/share/pyshared
to the Libraries tab in window->preferences->pydev->Interpreter - Python.
There were a lot of /usr/lib/python*
paths with the compiled libraries (the C stuff with python bindings) where included already, but not /usr/share
... parts with the source.
这篇关于如何在Eclipse中添加PIL到PyDev,所以我可以导入它并在我的项目中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!