首页 > 解决方案 > 在 jupyter notebook 中导入 pymc3 的问题

问题描述

在我的 jupyter notebook 中导入pymc3会导致以下错误:

ImportError: cannot import name 'logsumexp'"

以下是其他一些软件包版本:

尝试其他pymc3并没有解决问题


我确实设法以logsumxp这种方式导入:

from pymc3.special import logsumexp

Normal但是当我以同样的方式导入时,我得到了这个错误:

AttributeError: module 'xarray.core' has no attribute 'formatting_html'

标签: pythonjupyter-notebookimporterrorpymc3

解决方案


你已经安装了吗?例如使用“pip install pymc3”(https://docs.pymc.io/)?

对我来说,使用pymc3.special模块时导入不起作用,因为它说它不存在。

试试“ from pymc3 import Normal

如果您找不到本地 jupyter notebook 的解决方案,您也可以简单地使用 Google Collab 在此处创建和使用您的笔记本:https ://colab.research.google.com/ 。


推荐阅读