Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1530562
  • 博文数量: 289
  • 博客积分: 11086
  • 博客等级: 上将
  • 技术积分: 3291
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-22 17:06
个人简介

徐小玉的博客。

文章分类

全部博文(289)

文章存档

2023年(6)

2022年(1)

2021年(2)

2020年(9)

2019年(9)

2018年(6)

2017年(10)

2016年(10)

2014年(3)

2013年(4)

2011年(12)

2010年(16)

2009年(14)

2008年(119)

2007年(48)

2006年(20)

我的朋友

分类: LINUX

2023-06-18 16:47:07

的手忙脚乱的过程。。。。。。。


1: Set up Jupiter
  #pip3 install jupyter
   pip3 install --user jupyter

   出现这样的信息:
  WARNING: The script wsdump is installed in '/Users/*/Library/Python/3.11/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

2:  运行: python3 -m IPython notebook
   出现这样的错误:
   [TerminalIPythonApp] WARNING | File 'notebook' doesn't exist

   运行这两条,也不行:
   jupyter --version
   jupyter notebook --version

但写全路径可以: /Users/*/Library/Python/3.11/bin/jupyter --version

一说是因为环境变量的设置。 测试可行的策略是: 
在 ~/.bash_profile 添加环境变量:
/Users/mydirectory/Library/Python/3.11/bin

export PATH="${PATH}:/Users/mydirectory/Library/Python/3.11/bin"
export PYTHONPATH="${PYTHONPATH}:/Users/mydirectory/Library/Python/3.11/bin"

其中第二条也可以用下面的别名方式代替:
alias jupyter='/Users/mydirectory/Library/Python/3.11/bin/jupyter'

随后:source ~/.bash_profile

3:   此时,下列命令已经可以显示:
      jupyter --version
     jupyter notebook --version
    然而, python3 -m IPython notebook 仍显示 [TerminalIPythonApp] WARNING | File 'notebook' doesn't exist
    jupyter仍无法启动。

4: 每次都得 source ~/.bash_profile  :-(

5: jupyter --help 可以查各项命令路径等。

6: 事实证明, 启动是可以这样的:::::::::::::真是若不自宫,也可练功啊! 一下午替调了个寂寞!
jupyter-notebook
()

7: Mac两种shell的切换:

chsh -s /bin/zsh
chsh -s /bin/bash

阅读(767) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~