[Data Analysis - Basic Introduction to NumPy③] Daily Problem Solving

foreword

This article is used to sort out the mistakes encountered in the process of learning NumPy, and make a record, hoping to help everyone and avoid detours.

1. Start Jupyter Notebook and report that there is no such directory

When starting Jupyter Notebook through Anaconda Prompt, enter jupyter notebook to start, and the error is reported as follows.

  • Error content
[C 15:10:24.653 NotebookApp] Bad config encountered during initialization:
[C 15:10:24.653 NotebookApp] No such notebook dir: ''F:\\Codes\\2022-2023-2\\Python\\jupyter notebook''
  • reason

Anaconda configures the default open directory for Jupyter Notebook. If you want to open Jupyter Notebook in another directory, an error will be reported at this time.

  • solution

Cancel the default configuration directory of Jupyter Notebook and open it flexibly. The following is the solution.

  • <1> Open Anaconda Prompt and run the following command.
jupyter notebook --generate-config

You can get the directory where the config file of Jupyter Notebook is located, here we don't need to input y or n, just copy the directory.

  • <2> Go to the path and edit the file

Search the content of the file, the keyword is c.NotebookApp.notebook_dir, if you have configured a local path here, it means that this is the reason, just comment out this line; if you have not configured a local path, then this article may not help you, please refer to other article.

epilogue

This is the end of the content shared in this issue, the happy time is always so short~~

# Past articles & related guides

[Data Analysis - Basic Introduction to NumPy②] Jupyter Notebook installation and use

Guess you like

Origin blog.csdn.net/qq_62592360/article/details/131502797