展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

终端使用jupyter

点击查看详情
  • 报错
C:\Users\ychen\Downloads
λ ls
nbterm-0.0.13-py3-none-any.whl

C:\Users\ychen\Downloads
λ pip install nbterm-0.0.13-py3-none-any.whl
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Processing c:\users\ychen\downloads\nbterm-0.0.13-py3-none-any.whl
Requirement already satisfied: pygments in c:\programdata\anaconda3\lib\site-packages (from nbterm==0.0.13) (2.2.0)
Collecting prompt-toolkit>=3.0.16
  Downloading https://mirrors.aliyun.com/pypi/packages/eb/37/791f1a6edd13c61cac85282368aa68cb0f3f164440fdf60032f2cc6ca34e/prompt_toolkit-3.0.36-py3-none-any.whl (386 kB)
     |████████████████████████████████| 386 kB 2.2 MB/s
Collecting rich
  Downloading https://mirrors.aliyun.com/pypi/packages/32/60/81ac2e7d1e3b861ab478a72e3b20fc91c4302acd2274822e493758941829/rich-12.6.0-py3-none-any.whl (237 kB)
     |████████████████████████████████| 237 kB 2.2 MB/s
ERROR: Could not find a version that satisfies the requirement kernel-driver>=0.0.6 (from nbterm) (from versions: 0.0.1)ERROR: No matching distribution found for kernel-driver>=0.0.6

C:\Users\ychen\Downloads
λ ls
kernel_driver-0.0.7-py2.py3-none-any.whl

C:\Users\ychen\Downloads
λ pip install kernel_driver-0.0.7-py2.py3-none-any.whl
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Processing c:\users\ychen\downloads\kernel_driver-0.0.7-py2.py3-none-any.whl
Collecting rich
  Using cached https://mirrors.aliyun.com/pypi/packages/32/60/81ac2e7d1e3b861ab478a72e3b20fc91c4302acd2274822e493758941829/rich-12.6.0-py3-none-any.whl (237 kB)
Requirement already satisfied: python-dateutil in c:\programdata\anaconda3\lib\site-packages (from kernel-driver==0.0.7) (2.6.1)
Requirement already satisfied: pyzmq in c:\programdata\anaconda3\lib\site-packages (from kernel-driver==0.0.7) (16.0.2)
ERROR: Package 'kernel-driver' requires a different Python: 3.6.3 not in '>=3.7'
  • 下载
# 激活>=3.7的虚拟环境
C:\Users\ychen
λ activate env_dev

C:\Users\ychen
(env_dev) λ python
Python 3.10.4 | packaged by conda-forge | (main, Mar 30 2022, 08:38:02) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

# 安装库
C:\Users\ychen
(env_dev) λ pip install nbterm
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting nbterm
  Downloading https://mirrors.aliyun.com/pypi/packages/fc/b9/ef73e261f991e878341b0bd1a928aa2c0e4bdace690437671f1d3489d4f2/nbterm-0.0.13-py3-none-any.whl (12 kB)
Requirement already satisfied: prompt-toolkit>=3.0.16 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from nbterm) (3.0.32)
Requirement already satisfied: typer>=0.4.0 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from nbterm) (0.11.0)
Requirement already satisfied: pygments in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from nbterm) (2.13.0)
Requirement already satisfied: rich in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from nbterm) (13.7.1)
Requirement already satisfied: kernel-driver>=0.0.6 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from nbterm) (0.0.7)
Requirement already satisfied: pyzmq in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from kernel-driver>=0.0.6->nbterm) (25.1.0)
Requirement already satisfied: python-dateutil in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from kernel-driver>=0.0.6->nbterm) (2.8.2)
Requirement already satisfied: wcwidth in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from prompt-toolkit>=3.0.16->nbterm) (0.2.5)
Requirement already satisfied: click>=8.0.0 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from typer>=0.4.0->nbterm) (8.1.7)
Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from typer>=0.4.0->nbterm) (4.10.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from rich->nbterm) (3.0.0)
Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from click>=8.0.0->typer>=0.4.0->nbterm) (0.4.6)
Requirement already satisfied: mdurl~=0.1 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from markdown-it-py>=2.2.0->rich->nbterm) (0.1.2)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\envs\env_dev\lib\site-packages (from python-dateutil->kernel-driver>=0.0.6->nbterm) (1.16.0)
Installing collected packages: nbterm
Successfully installed nbterm-0.0.13
  • 使用
C:\Users\ychen\Desktop
(env_dev) λ nbterm

  • 快捷键
enter: 进入编辑模式,编写代码
esc: 编写完成后,进入控制模式
ctrl + e: 执行
ctrl + r: 执行并跳到(新建)下一个单元格
l: 清空单元格执行后输出的内容

上、下: 跳转到上一个(下一个)单元格
a: 在当前单元格的上面新建空的单元格
b: 在当前单元格的下面新建空的单元格
x: 删除当前单元格
c: 复制当前单元格
v: 在下方粘贴当前复制的单元格

o: 设置为代码单元格
m: 设置为Markdown单元格

ctrl + s: 保存
ctrl + q: 退出
ctrl + h: 查看帮助
  • 打开已有文件
C:\Users\ychen\Desktop
λ activate env_dev

C:\Users\ychen\Desktop
(env_dev) λ ls
 01.ipynb     

C:\Users\ychen\Desktop
(env_dev) λ nbterm 01.ipynb
posted @ 2024-03-27 13:13  DogLeftover  阅读(8)  评论(0编辑  收藏  举报