eclipse +PyDev开发python,import其他模块时eclipse会报错,运行却没有问题

时间:2022-06-30 02:48:55
用eclipse +PyDev开发python时,需要import其他文件时eclipse会报错,但是在python的命令行中运行却没有问题。 解决方法:
1.右键工程——properties 2.选择Pydev-Interface/Grammar,点击链接Click here to configure aninterpreter not listed 3.在python Interperter中选择New Folder,添加文件的父目录即可。