问题
Where do I store custom .py files for Anaconda3 on Mac, so that I can import them as packages in Jupyter Notebook?
回答1:
You can store them anywhere if you insert
import os
import sys
sys.path.append(os.path.abspath("path/to/module.py"))
from module import *
来源:https://stackoverflow.com/questions/50293427/import-custom-py-files-in-jupyter-notebook-for-anaconda3