You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Anaconda安装后Jupyter启动异常及默认浏览器修改问题咨询

解决Jupyter启动链接异常与默认浏览器修改问题

Hey there, let's work through these two Jupyter issues you're hitting after reinstalling Anaconda—they're both straightforward fixes, so let's dive in!

问题1:启动链接显示http://localhost:8892/undefined/tree

This usually happens when Jupyter can't locate its default notebook directory, or your config file got corrupted during the reinstall. Here's how to fix it:

  • First, generate a fresh config file (or reset your existing one): Open Anaconda Prompt (or terminal on Mac/Linux) and run:
    jupyter notebook --generate-config
    
    If prompted to overwrite an existing config, type y and hit enter.
  • Find the config file: It’s saved at C:\Users\YourUsername\.jupyter\jupyter_notebook_config.py (Windows) or ~/.jupyter/jupyter_notebook_config.py (Mac/Linux).
  • Open the file with a text editor (like VS Code or Notepad) and search for the line starting with #c.NotebookApp.notebook_dir.
    • Remove the # to uncomment it, then set it to a valid, existing folder path on your computer. For example (Windows):
      c.NotebookApp.notebook_dir = 'C:\\Users\\YourUsername\\Documents\\Jupyter_Notebooks'
      
      Use double backslashes (\\) for Windows paths, or single forward slashes (/) for Mac/Linux.
  • Save the config file, close it, then restart Jupyter Notebook. The undefined should disappear from your launch link.

问题2:将默认浏览器从Internet Explorer改为Google Chrome

You can set this directly in the same Jupyter config file:

  • Open the jupyter_notebook_config.py file again and search for #c.NotebookApp.browser.
  • Uncomment the line and set it to Chrome's executable path, followed by %s (this tells Jupyter to pass the launch URL to Chrome).
    • For Windows (check if Chrome is in Program Files or Program Files (x86)):
      c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe %s'
      
    • For Mac:
      c.NotebookApp.browser = 'open -a Google\\ Chrome %s'
      
    • For Linux:
      c.NotebookApp.browser = '/usr/bin/google-chrome %s'
      
  • Save the config, restart Jupyter, and it’ll now launch Chrome automatically instead of IE.

内容的提问来源于stack exchange,提问作者Pro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:25:26