命令运行jupyter nbconver将ipynb文件为markdown文件。cmd无法识别‘jupyter’
记录两种解决办法
找到nbconvert包位置->cmd进入包所在目录->jupyter-nbconvert.exe --to markdown E:\python\q.ipynb
找到nbconvert包位置
import nbconvert
print(nbconvert.__file__)
![](https://i-blog.csdnimg.cn/blog_migrate/b9fe2ec71ef1decc2ea2684e34e52309.png)
cmd进入包所在目录
![](https://i-blog.csdnimg.cn/blog_migrate/4ed58596d0c875488c85bafa15b05797.png)
jupyter-nbconvert.exe --to markdown E:\python\q.ipynb
![](https://i-blog.csdnimg.cn/blog_migrate/abbc080cf5a5f1c6939c71428add1fba.png)
新建xx.ipynb->执行程序
from nbconvert import MarkdownExporter
mar = MarkdownExporter()
k = mar.from_file('q.ipynb')
with open('k.md','w', encoding='utf-8') as f:
f.write(k[0])