Python 安装 anaconda 后 - 找不到命令:jupyter

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39779744/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 22:41:58  来源:igfitidea点击:

After installing anaconda - command not found: jupyter

pythonanacondajupyter-notebook

提问by Marco

I have installed anaconda on my MAC laptop, and tried to run jupyter notebook to install it, but I get error jupyter command not found.

我已经在我的 MAC 笔记本电脑上安装了 anaconda,并尝试运行 jupyter notebook 来安装它,但我收到错误 jupyter command not found。

回答by ffledgling

You need to activate your conda environment (source bin/activate) and then do

您需要激活您的 conda 环境 ( source bin/activate) 然后执行

$ pip install jupyter
$ jupyter notebook # to actually run the notebook server

回答by Chirag Arora

Add $HOME/anaconda3/binto your $PATHand jupyter-notebookshould work. There are a ton of other binaries you can lookup in that folder as well.

添加$HOME/anaconda3/bin到您的$PATH并且jupyter-notebook应该工作。您也可以在该文件夹中查找大量其他二进制文件。

export PATH=$HOME/anaconda3/bin:$PATH

then

然后

jupyter-notebook

回答by Vitor Navarro

@ffledgling anwser did not work for me. What did solve was to install jupyter using conda:

@ffledgling anwser 对我不起作用。解决的是使用conda安装jupyter:

conda install jupyter

conda install jupyter

That did the trick. Right after the installation finished I went with

这就是诀窍。安装完成后我就去了

jupyter notebook

jupyter notebook

as my next command and saw the server setup and the browser page opening.

作为我的下一个命令,看到服务器设置和浏览器页面打开。

回答by Olivier de Jonge

It could be as simple as opening a new Terminal window.

它可以像打开一个新的终端窗口一样简单。

回答by Lisa Olson

I had this same problem on my Mac OS. I'm also new to Python, so forgive me if this is an obvious solution. What solved it for me was installing Python with the 'install for me only' option rather than the hard-drive option. If it tells you you can't, then reselect it. After that, the command jupyter notebook opened without a problem. Hope it can help someone!

我在 Mac OS 上遇到了同样的问题。我也是 Python 新手,所以如果这是一个明显的解决方案,请原谅我。为我解决的是使用“仅为我安装”选项而不是硬盘驱动器选项来安装 Python。如果它告诉您不能,则重新选择它。之后,命令 jupyter notebook 打开没有问题。希望它可以帮助某人!

How to

如何

Installation Screenshot

安装截图

回答by vigviswa

I had the same issue on Mac. I am using Miniconda Opened ~/.zshrc profile on nano as, nano ~/.zshrcand added the location of miniconda on my mac as the last line of the ~/.zshrc as:

我在 Mac 上遇到了同样的问题。我在 nano 上使用 Miniconda Opened ~/.zshrc 配置文件,nano ~/.zshrc 并在我的 mac 上添加了 miniconda 的位置作为~/.zshrc 的最后一行:

export PATH="/usr/local/Caskroom/miniconda/base/bin:$PATH"

solves the issue easily.

轻松解决问题。

回答by Simran Bhake

Open a new terminal and try again, it worked for me. This is written somewhere in the installation guide "For this change to become active, you have to open a new terminal."

打开一个新终端并重试,它对我有用。这写在安装指南的某处“要使此更改生效,您必须打开一个新终端。”

回答by iRestMyCaseYourHonor

If your issue is happening after running conda install jupyter, you can use conda init zshto configure the ~/.zshrcautomatically so that when you just type jupyter notebookon terminal, it can find it.

如果您的问题在运行后发生conda install jupyter,您可以使用自动conda init zsh配置~/.zshrc以便当您jupyter notebook在终端上输入时,它可以找到它。

回答by luii

I ran into the same problem try this instead

我遇到了同样的问题试试这个

jupyter-notebook

回答by Filipe

You should first have conda in your PATH environment. You can achieve it taking a look on this answer.

您应该首先在 PATH 环境中安装 conda。您可以通过查看此答案来实现它。

Now you just need to run jupyter notebook.

现在你只需要运行jupyter notebook.