[Python] How to set the running file path of jupyter in VScode?

Discussão em 'Python' iniciado por Stack, Agosto 29, 2025.

  1. Stack

    Stack Membro Participativo

    When I use the jupyter extension in VScode and run a line of code in jupyter to save a file using relative path,I found the file(iris_tree.dot) in another file. It's just like i debug/run the code in another file path. How can I set the correct path of the jupyter runner?

    #%%
    from sklearn.tree import export_graphviz
    export_graphviz(
    tree_clf,
    out_file="iris_tree.dot",
    feature_names=iris.feature_names[2:],
    class_names=iris.target_names,
    rounded=True,
    filled=True
    )

    Continue reading...

Compartilhe esta Página