Eclipse和python:库将导入解释器,但不会在IDE中导入 [英] Eclipse and python: library will import in interprer, but not in IDE

查看:249
本文介绍了Eclipse和python:库将导入解释器,但不会在IDE中导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Windows 7,Python 2.6.4和最新版本的Eclipse。我下载了boto图书馆( http://code.google.com/p/boto/)并运行python setup.py install,它在C:\Python26\Lib\site-packages中创建了boto-1.9b-py2.6.egg。



导入一个类 - 通过从'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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆