您好,我在Python中使用Fitter模块拟合数据时遇到困难,我不理解错误,因为我对Python非常陌生。下面的代码是我到目前为止为了得到总结所做的工作
import fitter
f=fitter.Fitter(data=data["ROAS"], distributions= ['gamma'])
f.fit()
f.summary()
我得到的错误是:
DistributionNotFound Traceback (most recent call last)
<ipython-input-29-c00604ced33b> in <module>
1 f=fitter.Fitter(data=data["ROAS"])
----> 2 f.fit()
3 f.summary()
~\anaconda3\lib\site-packages\fitter\fitter.py in fit(self, amp, progress)
259 warnings.filterwarnings("ignore", category=RuntimeWarning)
260
--> 261 from easydev import Progress
262 N = len(self.distributions)
263 pb = Progress(N)
~\anaconda3\lib\site-packages\easydev\__init__.py in <module>
28 version = __version__
29 else:
---> 30 version = pkg_resources.require("easydev")[0].version
31 __version__ = version
32
~\anaconda3\lib\site-packages\pkg_resources\__init__.py in require(self, *requirements)
882 included, even if they were already activated in this working set.
883 """
--> 884 needed = self.resolve(parse_requirements(requirements))
885
886 for dist in needed:
~\anaconda3\lib\site-packages\pkg_resources\__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)
768 if dist is None:
769 requirers = required_by.get(req, None)
--> 770 raise DistributionNotFound(req, requirers)
771 to_activate.append(dist)
772 if dist not in req:
DistributionNotFound: The 'ptyprocess>=0.5' distribution was not found and is required by pexpect
请有人能帮我运行没有错误的代码,谢谢
我也有同样的问题。我安装了“ptyprocess”库,现在它可以工作了
相关问题 更多 >
编程相关推荐