如何在 iPython 的 Jupyter 笔记本中安装模块

How to install module in Jupyter Notebooks for iPython

我在 Jupyter Notebooks 中使用 iPython 笔记,需要使用导入 lmfit。我如何导入它才能在我的 jupyter notebook 中可用?

我应该澄清这个问题适用于多个模块(实际上任何你可以使用 pip 或 conda 安装的模块)。我正在尝试确定如何在 Jupyter Notebook 中安装模块。

运行 ! pip install <package> 在 jupyter 笔记本中。

!告诉笔记本 运行 bash 中的命令,只需确保您使用的 pip 与笔记本正在使用的解释器相同

请查看 lmfit here 的安装指南。

这个包有一些问题。即使在安装之后,也无法导入到 lmfit。我的建议是寻求支持 here 或检查 git 存储库并提出问题。