解決方法有兩種
1. 第一種設置環境變量法
on windows the line is :
SET PYTHONPATH=%cd%;%cd%\Test
NOT
SET PYTHONPATH=%cd%:%cd%\Test
You can test with :
echo %PYTHONPATH%
2.第二種方法
進入 python 運行環境
import sys
import os
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)