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

跟随《Hands-On ML》书籍实操时执行jupyter notebook命令报错求助

解决Jupyter Notebook启动报错的问题

Hey there, let's work through this Jupyter error you're hitting! The "No such file or directory" message usually means Jupyter isn't installed in the virtual environment you're using, or you haven't activated that environment properly. Let's break down the fixes step by step:

1. 确认虚拟环境已正确激活

First off, it looks like your activation command was cut off (source env/bin/acti...). Make sure you run the full activation command for your Linux/macOS system:

source env/bin/activate

After running this, you should see (env) at the start of your command line prompt — that's how you know the virtual environment is active. If you don't see this, the environment isn't loaded, so any installs you do won't go into it.

2. 在激活的虚拟环境中安装Jupyter

Since you set up the virtual environment but didn't mention installing Jupyter inside it, that's probably the missing piece. With the environment active, run:

pip install jupyter

Wait for the installation to finish, then try launching Jupyter again with:

jupyter notebook

额外排查步骤

If it still doesn't work, here are a couple more checks:

  • Run pip list and look for "jupyter" in the output. If it's not there, the installation failed — try running the install command again, maybe with --user flag if you hit permission issues (though you shouldn't need it in a virtual env).
  • Run which jupyter to see where the command is located. It should point to something like ~/env/bin/jupyter (your virtual environment's bin folder). If it points to a system-wide location, that means you're not using the virtual environment's Jupyter install.

That should get you up and running with Jupyter Notebook for your ML book exercises!

内容的提问来源于stack exchange,提问作者A.badger

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 07:06:42