简体   繁体   English

导入lmfit成功,但未从lmfit导入模型

[英]importing lmfit succesfull but importing Model from lmfit not

I have installed lmfit trough PIP 我已经安装了lmfit槽PIP

pip install lmfit==0.7.2

importing lmfit in ipython notebook seems to work. 在ipython笔记本中导入lmfit似乎可行。 That is, the import does not give any error messages and I can call a bunch of functions from lmfit. 也就是说,导入不会给出任何错误消息,我可以从lmfit调用一堆函数。

However when i try to import Model from lmfit it gives me an import error: 但是,当我尝试从lmfit导入模型时,它给了我一个导入错误:

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? 有人有建议吗?

I'm pretty sure the Model Class is new to lmfit-py release 0.8.1 so you may have to update lmfit. 我很确定Model Class对于lmfit-py 0.8.1版来说是新的,因此您可能必须更新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) (我有0.7.2的脱机文档,其中不包含有关“模型类”的部分,但版本0.8.1的文档中有此文档)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM