
[英]How to insert the user input for a Python code when I save it to html
我在 Python 中用用户输入在 Jupyter Notebook 上写了一段代码。 然后,我将它保存在一个 html 文件中以与其他人共享,但他们无法更改输入。 如何使 html 文件与 ipynb 文件交互? 在 Jupyter 上,我写了 var = input("What is your ...
[英]How to insert the user input for a Python code when I save it to html
我在 Python 中用用户输入在 Jupyter Notebook 上写了一段代码。 然后,我将它保存在一个 html 文件中以与其他人共享,但他们无法更改输入。 如何使 html 文件与 ipynb 文件交互? 在 Jupyter 上,我写了 var = input("What is your ...
[英]jupyter nbconvert doesn't work in the environment created by snakemake --use-conda
我已经坚持这个问题好几天了。 我创建了环境 envs/jupyter.yaml 如下 snakefile 规则看起来像 当我运行“snakemake --use-conda”时,错误 我的 nbconvert 版本 当我进入虚拟环境 dd29012628c49c75d6a5c31f75898e03 ...
[英]How to make Cell input part (code) disappear -show only output- when creating slides using Jupyter notebook and nbconvert?
我正在尝试使用 jupyter notebook 和 nbconvert Python 模块为数据分析任务创建幻灯片。 我想显示作为可视化部分的单元格的输出,我想摆脱代码部分。 它已创建,但包含幻灯片中的代码部分。 我尝试了 Udacity Data Analysis Nano degree 的一 ...
[英]How to disable the header with filename and date when converting .ipynb to pdf with nbconvert?
我正在使用nbconvert将 my.ipynb 转换为 an.pdf 文件。 这样做时,生成的 .pdf 文件包含一个 header,其文件名和当前日期如下。 我怎样才能禁用它? 我正在查看文档,但找不到如何操作。 CLI 命令jupyter nbconvert --to pdf filena ...
[英]What is the best way to write down in-line math equations in a jupyter notebook to have best LaTeX results?
当我在 jupyter 笔记本的 markdown 单元中编写数学方程式时,我随便把所有这些都放在 $...$ 中。 今天,我将an.ipynb文件转换为.tex,发现这些方程大部分都转换成output pdf中的乱七八糟的东西。 例如,我意识到它将所有 '$' 转换为 '$'。 这是发生的事情的 ...
[英]500 internal server error when I launch Jupyter notebook
我目前决定重新安装 jupyter,因为 kernel 不断停止。 在 conda 卸载 ipykernel 并重新安装后,我遇到了一系列问题: 首先,一旦我在 jupyter 上打开笔记本,就会发生 500 内部错误; 其次,我尝试按照有关该主题的一些问题中的建议重新安装 nbconvert ,但 ...
[英]Running reprexpy on PyCharm CE: ImportError: cannot import name 'contextfilter' from 'jinja2'
我在 PyCharm CE 上安装了 reprexpy 0.3.1,但是当我运行它时,出现以下错误: 按照此处和此处的建议,我尝试在终端中更新 nbconvert: 然后我重新启动 PyCharm CE,但我一直收到同样的错误。 ...
[英]How to specify the name and location of the output file when using nbconvert?
使用nbconvert时,如何指定新文件的名称和目录? ...
[英]nbconvert failed: No suitable chromium executable found on the system. Please use '--allow-chromium-download' to allow downloading one
收到错误为“nbconvert failed:在系统上找不到合适的 chromium 可执行文件。请使用“--allow-chromium-download”允许下载一个。” 在尝试将 jupyter notebook 文件(.ipynb)下载为 PDF 文件时 ...
[英]nbconvert failed: Pyppeteer is not installed to support Web PDF conversion. Please install `nbconvert[webpdf]` to enable
收到错误消息“nbconvert 失败:未安装 Pyppeteer 以支持 Web PDF 转换。请安装nbconvert[webpdf]以启用。” 尝试将 jupyter notebook 文件 (.ipynb) 下载为 PDF 文件时 ...
[英]Python Jupyter notebook ossystem / nbconvert path change
目前,我有 Jupiter 笔记本,其中包含我希望将笔记本运行的输出转换为 html 格式的报告(无代码)。 为此,我使用 os.system 和 python 脚本(见下文)。 但是,这是将文件保存在我的笔记本所在的同一文件夹中。 我需要它将 html 报告保存在另一个目录中。 关于如何仅为运行此 ...
[英]Nbconvert: How to change font of code cells in the output pdf/html?
我正在使用 nbconvert 将 jupyter notebook 文件转换为 html 和/或 pdf。 使用下面的自定义模板,jupyter notebook 中的 Markdown 文本都是 Arial; 但是,使用 print 语句从代码单元创建的文本是不同的字体。 如何将输出文本的字体从 ...
[英]Can a pre-commit (pre-commit.com) hook add files to a commit?
预提交钩子(使用 pre-commit.com)可以将文件添加到提交中吗? 我的用例:我确实在 jupyter 笔记本中工作。 在提交时,我想在提交中生成并 git-add任何ipynb文件的 html 版本。 例如一个提交钩子,如: 并以某种方式将文件添加到提交中。 我该怎么做呢? 还是 ...
[英]How do I help Python find Jupyter command 'jupyter-nbconvert', to export Jupyter Notebook to HTML?
更新 - 找到了解决方案,请参阅评论,并在本文末尾了解更多详细信息 我在 VS Code 中使用 Jupyter Notebook,并尝试通过Notebook 菜单选项卡将我的笔记本导出为 HTML 换句话说,我正在按照此页面的说明进行操作 尝试将 Jupyter Notebook 导出为 HTM ...
[英]how to programmatically add slides cell metadata in jupyter notebooks?
Jupyter notebooks 有一种可视化单元元数据的方法,这样当您使用nbconvert将笔记本导出到幻灯片时,您可以参数化单元格的外观。 例子: 例如,我想在不使用 GUI 的情况下以编程方式将该元数据添加到单元格中,以便我可以自动创建幻灯片,特别是来自 google colabo ...
[英]Converting .py files to .ipynb
我的组织将其制作的任何 Jupyter Notebooks(.ipynb 文件)转换为 Python 脚本(.py 文件),以便在我们的存储库中进行管理。 我需要将它们转换回来,以便我可以运行笔记本,但不知道如何运行。 我相信它们已经使用nbconvert包进行了编码,但我找不到将文件转换回包文档 ...
[英]How to get images rendered when converting a Jupyter Notebook to PDF?
我使用“nbconvert”和“notebook-as-pdf”模块将我的 Jupyter Notebooks 转换为 PDF 文件,并在命令行中执行以下操作: 笔记本中显示的 Markdown 单元格中引用的图像(png 文件)不会在生成的 PDF 文件中呈现。 我通过以下方式引用 MD 单元格 ...
[英]How to remove date from pdf produced from ipynb with nbconvert
我正在以编程方式使用 nbconvert 将 jupyter 笔记本文件导出到 pdf: 这有效,但是今天的日期被插入到标题下的文档中。 这个日期在我正在制作的内容中具有误导性。 我尝试删除它涉及编辑share\jupyter\nbconvert\templates\latex\base.tex. ...
[英]TemplateNotfound error while converting notebook into pdf
我的虚拟环境中有一个 .ipynb 文件。 我安装了以下软件包; 在我的虚拟环境中,我运行这个命令; 但此错误消息失败; jinja2.exceptions.TemplateNotFound: index.tex.j2 我可以就如何解决这个问题获得一些帮助吗?我觉得我拥有 nbconvert 工作所 ...
[英]Pandoc Jupyter (.ipynb) to Word (.docx) incorrect results
Jupyter 笔记本 (ipynb) 到 Word 格式文档 (.docx) 的转换无法正常工作。 我尝试了几种使用 jupyter nbconvert、pandoc 和商业文档格式转换器的方法。 到目前为止,没有一个产生适当的结果。 我必须相信 pandoc 有某种方法可以正确地进行转换。 非 ...