python - 在 jupyter notebook 中导入 pymc3 的问题
问题描述
在我的 jupyter notebook 中导入pymc3
会导致以下错误:
ImportError: cannot import name 'logsumexp'"
以下是其他一些软件包版本:
- 视窗 10
- Python 3.6.7
- Numpy 1.17.0
- Matplotlib 3.0.3
- 熊猫 0.23.4
- Scipy 1.5.1
- Scitkitlearn 0.23.1
- 统计模型 0.11.1
- Theano 1.0.4
尝试其他pymc3并没有解决问题
我确实设法以logsumxp
这种方式导入:
from pymc3.special import logsumexp
Normal
但是当我以同样的方式导入时,我得到了这个错误:
AttributeError: module 'xarray.core' has no attribute 'formatting_html'
解决方案
你已经安装了吗?例如使用“pip install pymc3”(https://docs.pymc.io/)?
对我来说,使用pymc3.special模块时导入不起作用,因为它说它不存在。
试试“ from pymc3 import Normal ”
如果您找不到本地 jupyter notebook 的解决方案,您也可以简单地使用 Google Collab 在此处创建和使用您的笔记本:https ://colab.research.google.com/ 。
推荐阅读
- python - Python - Pandas 模块 - 过滤器显示为字符串而不是布尔值
- html - 无法使用烧瓶在 html 中显示来自 webhook 的数据
- javascript - JQuery - 转换文本和空格
- c# - .net web api插入多个相同的数据
- python - 在 Plotly Express 的 px.scatter_3d() 中表示聚类中心
- opengl - GtkGLArea 的深度问题
- python - 在 pymongo 中使用 .aggregate 复制集合时如何正确使用“$out”运算符?
- python - 带有 Amazon SageMaker 的语义内容推荐系统,存储在 S3 中
- awk - 为什么 awk 无法对小数点进行操作?
- three.js - Cannonjs 在移动身体时出现故障