简体   繁体   English

eclipse中的Python导入错误(程序包在命令行中起作用,但在eclipse中不起作用)

[英]Python import error in eclipse (Package works in command line but not eclipse)

I'm having trouble importing tweepy. 我在导入tweepy时遇到问题。 I've looked through so many previous questions and still can't find a correct solution. 我已经看过很多以前的问题,但仍然找不到正确的解决方案。 I think it has something to do with how tweepy is being downloaded when I install but I'm not sure. 我认为这与我安装时下载tweepy的方式有关,但我不确定。 I get an import error saying that "tweepy is not a package". 我收到一个导入错误,说“ tweepy不是软件包”。

I have tweepy library connected to the interpreter and all that but, it is saved as a compressed EGG file instead of a file folder like the rest of my packages. 我已经将tweepy库连接到解释器,但所有这些都保存为压缩的EGG文件,而不是像其他软件包一样保存在文件夹中。 I think that has something to do with it but I'm not too sure. 我认为这与它有关,但我不太确定。

Also, tweepy works in my command line but not in eclipse. 另外,tweepy在我的命令行中有效,但在Eclipse中不起作用。

如果最近安装的程序包也许只是重新配置的PyDev( Window - > Preferences - > PyDev - > Interpreters - > Python InterpreterQuick Auto Configure )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM