mattshma / bigdata

hadoop,hbase,storm,spark,etc..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

mattshma opened this issue · comments

在 MacOS High Sierra 10.13.1 搭建 tensorflow 的 jupyter 测试环境,通过

$ python -m pip install --upgrade pip
$ python -m pip install jupyter

安装后,执行

$ jupyter notebook
Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

而执行ipython notebook是正常的。

查找 jupyter-notebook,发现在$HOME/Library/Python/2.7/bin目录。将该目录添加到 PATH 中,再次执行 jupyter notebook,成功。

注1:若pip使用 --user参数,则可执行文件被安装在$HOME/Library/Python/2.7/bin中,需将该目录添加到 PATH 中。
注2:使用 jupyter-notebook --generate-config 可在当前用户的根目录的 .jupyter 生成 jupyter 的配置文件。若需取消验证,在该配置文件中配置即可。如:

c.NotebookApp.token = ''
c.NotebookApp.password = u''
c.NotebookApp.notebook_dir = u'/Users/xxxxx/jupyter'