文章目录
Python会在以下路径中搜索它想要寻找的模块:
-
程序所在的文件路径
-
标准库的安装路径
-
操作系统环境变量PYTHONPATH所包含的路径
# 添加系统路径
import sys
sys.path.append(r"D:/PycharmProjects/Work preparation/九、人工智能项目班/scoredcard1/")
# 打印路径
print(sys.path)
from hello_word import helloworld
print(helloworld(