PyCharm同级目录导入模块会提示错误,但是可以运行
解决:
在当前目录右键make_directory as-->Sources Root
1
如果需要多级导入,可以试试添加到系统路径
import sys
sys.path.append('b模块的绝对路径')
import b
---------------------
原文:https://blog.csdn.net/mouday/article/details/82051685
PyCharm同级目录导入模块会提示错误,但是可以运行
解决:
在当前目录右键make_directory as-->Sources Root
1
如果需要多级导入,可以试试添加到系统路径
import sys
sys.path.append('b模块的绝对路径')
import b
---------------------
原文:https://blog.csdn.net/mouday/article/details/82051685