问题:python项目导包出现错误
命令行执行:
cd A
A> python main.py
# Traceback (most recent call last):
# File "main.py", line 1, in <module>
# from A import func1
# ModuleNotFoundError: No module named 'A'
解决办法:在导入A中的方法前加以下几行代码,
import os
import sys
dir_mytest = os.path.dirname(o