BASE_DIR = os.path.dirname(os.getcwd())#用来从jupyter默认地址中脱离出来
import sys
sys.path.append(BASE_DIR)
sys.path.append('E:\CV_Paper_fuxian\lesson\B_VGG')#把文件所在的相对路径要添加进去。才不会报错
然后运行,就完美解决了。
- ImportError Python module 问题 namedimporterror python module named importerror module named xxx importerror python module问题 module问题named cv2 python import module named importerror-cannot-import-name-un importerror-cannot-import-name-un known-location pyinstaller importerror bootlocale module modulenotfounderror module named 39 pytorch module named 39