importing lmfit succesfull but importing Model from lmfit not

本小妞迷上赌 提交于 2019-12-25 01:21:58

问题


I have installed lmfit trough PIP

pip install lmfit==0.7.2

importing lmfit in ipython notebook seems to work. That is, the import does not give any error messages and I can call a bunch of functions from lmfit.

However when i try to import Model from lmfit it gives me an import error:

from lmfit import Model 

The import error.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-151-3ba1b6658da4> in <module>()
----> 1 from lmfit import Model

ImportError: cannot import name Model

I assume this has to do with a failed installation but do not know how to diagnose this further and/or how to fix it. Does anyone have a suggestion?


回答1:


I'm pretty sure the Model Class is new to lmfit-py release 0.8.1 so you may have to update lmfit.

(I have the offline documentation for 0.7.2 which does not include a section on the Model Class, but the documentation for version 0.8.1 has it)



来源:https://stackoverflow.com/questions/27291982/importing-lmfit-succesfull-but-importing-model-from-lmfit-not

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