首页 > 其他 > 详细

no module ***

时间:2021-09-24 19:29:23      阅读:38      评论:0      收藏:0      [点我收藏+]
import os
import sys
from pathlib import Path

sys.path.append("..")

current_dir = os.path.abspath(os.path.dirname(__file__))
parent_path = os.path.dirname(current_dir)
grandparent_path = os.path.dirname(parent_path)
grandparent_path_ = os.path.dirname(grandparent_path)
# grandparent_path_to = os.path.dirname(grandparent_path_)
# grandparent_path_to_ = os.path.dirname(grandparent_path_to)
#
# grandparent_path_to_to = os.path.dirname(grandparent_path_to_)

sys.path.append(grandparent_path_)
print(os.path.abspath(__file__))
print(sys.path)

no module ***

原文:https://www.cnblogs.com/leifzhang/p/15306833.html

(0)
(0)
   
举报
评论 一句话评论(0
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!