Eclipse + Pydev开发Python时import报错

来源:互联网 发布:php视频采集 编辑:程序博客网 时间:2024/06/08 08:29

用eclipse +PyDev开发python时,需要import其他文件时eclipse会报错,但是在python的命令行中运行却没有问题。


下面是问题的解决方法:
pip新下载的包
  1.右键工程——properties
  2.选择Pydev-Interface/Grammar,点击链接Click here to configure aninterpreter not listed
  3.将Python的包重新选择一遍再导入
自己写的模块
  1.右键工程——properties
  2.选择Pydev-Interface/Grammar,点击链接Click here to configure aninterpreter not listed
  3.在下方的选择框中点击New Folder,然后将自己写的模块所在父目录导入即可


去掉拼写检查
window - Preferences - General - Editors - Text Editors - Spelling - Enable spell checking

阅读全文
0 0
原创粉丝点击