嗨,我在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()
~anaconda3libsite-packagesfitterfitter.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)
~anaconda3libsite-packageseasydev__init__.py in <module>
28 version = __version__
29 else:
---> 30 version = pkg_resources.require("easydev")[0].version
31 __version__ = version
32
~anaconda3libsite-packagespkg_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:
~anaconda3libsite-packagespkg_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";图书馆,现在它工作。