colaboratory will not acknowledge arviz after installation and import

故事扮演 提交于 2020-05-15 02:04:44

问题


In Google's colaboratory, installed arviz then did import arviz without error, but in a code cell, pm.plot_posterior(samples) gets error: arviz not installed.

Trying to plot Bayesian code

pm.plot_posterior(samples)

I expect a plot


回答1:


Install Arviz prior to importing PyMC3, otherwise it apparently cannot find it. In your case, simply restarting the runtime (Runtime > Restart runtime...) should get it working.




回答2:


Hi did you try adding the cell magic %matplotlib inline? This may be an issue where jupyter-notebook doesn't "know" to render the plot inline



来源:https://stackoverflow.com/questions/57733115/colaboratory-will-not-acknowledge-arviz-after-installation-and-import

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!