Eclipse和python:库将导入解释器,但不会在IDE中导入 [英] Eclipse and python: library will import in interprer, but not in IDE
问题描述
导入一个类 - 通过从'boto.sqs.connection import SQSConnection'中进行操作 - 可以从python命令行工具中正常工作。但是Eclipse不会找到boto,尽管事实上它正在使用与在命令行下使用的相同的python解释器。我将该库作为外部源文件夹添加,但是也没有。如何正确导入boto库到Eclipse?
谢谢。
从评论中可以将其标记为应答
在首选项 - > Pydev->解释器 - Python中是什么是系统库的值
I'm running Windows 7, Python 2.6.4 and the latest version of Eclipse. I downloaded the boto library (http://code.google.com/p/boto/) and ran python setup.py install, which created boto-1.9b-py2.6.egg in C:\Python26\Lib\site-packages.
Importing a class - say, by doing 'from boto.sqs.connection import SQSConnection' - works fine from the python command line tool. But Eclipse will not find boto, despite the fact that it is using the same python interpreter as I am using when at the command line. I added the library as an external source folder, but that didn't work either. How can I properly import the boto library into Eclipse?
Thanks.
From the comment so can be marked as answered
In Preferences->Pydev->interpreter - Python what is the System libs value
这篇关于Eclipse和python:库将导入解释器,但不会在IDE中导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!