pycharm在同目录下import,pycharm会提示错误,但是可以运行 原因是: pycharm不会将当前文件目录自动加入自己的sourse_path。 解决方案:右键make_directory as-->sources path将当前工作的文件夹加入source_path就OK了