ubuntu下ipynb文件转py文件

1、先安装jupyter库:pip install jupyter

Collecting fqdn
  Downloading fqdn-1.5.1-py3-none-any.whl (9.1 kB)
Collecting isoduration
  Downloading isoduration-20.11.0-py3-none-any.whl (11 kB)
Collecting uri-template
  Downloading uri_template-1.2.0-py3-none-any.whl (10 kB)
Collecting arrow>=0.15.0
  Downloading arrow-1.2.3-py3-none-any.whl (66 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.4/66.4 kB 7.5 MB/s eta 0:00:00
Installing collected packages: webencodings, wcwidth, pure-eval, ptyprocess, pickleshare, mistune, ipython-genutils, 
fastjsonschema, executing, backcall, widgetsnbextension, websocket-client, webcolors, uri-template, traitlets, tornado, 
tinycss2, soupsieve, sniffio, Send2Trash, rfc3986-validator, rfc3339-validator, pyzmq, python-json-logger, pyrsistent, 
pycparser, psutil, prompt-toolkit, prometheus-client, pkgutil-resolve-name, pexpect, parso, pandocfilters, nest-asyncio, 
jupyterlab-widgets, jupyterlab-pygments, jsonpointer, jinja2, install, importlib-resources, fqdn, defusedxml, decorator, 
debugpy, bleach, attrs, asttokens, terminado, stack-data, qtpy, matplotlib-inline, jupyter-core, jsonschema, jedi, comm, cffi,
beautifulsoup4, arrow, anyio, nbformat, jupyter-server-terminals, jupyter-client, isoduration, ipython, argon2-cffi-bindings,
nbclient, ipykernel, argon2-cffi, qtconsole, nbconvert, jupyter-events, jupyter-console, ipywidgets, jupyter-server, 
notebook-shim, nbclassic, notebook, jupyter

2、转换文件:jupyter nbconvert --to script 文件名.ipynb

[NbConvertApp] Converting notebook instance.ipynb to script
[NbConvertApp] Writing 3548 bytes to instance.py

可以看到同级目录下生成了它的py文件。

说话前做事前都要多动脑子思考,不要做没有意义的重复工作。

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

振华OPPO

你的鼓励是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值