2

Hi I have difficulties in fitting data using Fitter module in Python and I don't understand the error as I am quite new to Python. The following code below is what I done so far in order to get the summary.

import fitter
f=fitter.Fitter(data=data["ROAS"], distributions= ['gamma'])
f.fit()
f.summary()

The error I get is:

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

Please can someone help me to run the code without the error, thanks.

ahmedm
  • 41
  • 4

1 Answers1

0

I had the same problem. I installed the "ptyprocess" library and now it works.

Manuel
  • 1