In [2]:
!pip install apyori


Collecting apyori
  Downloading apyori-1.1.1.tar.gz
Building wheels for collected packages: apyori
  Running setup.py bdist_wheel for apyori ... done
  Stored in directory: /Users/falehalrashidi/Library/Caches/pip/wheels/fc/a6/7b/9a3b9a1eb6034c23f1f6b8ff65593ded70afa3ff1a6e0e32e2
Successfully built apyori
Installing collected packages: apyori
Successfully installed apyori-1.1.1
You are using pip version 9.0.1, however version 9.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

In [3]:
!pip install --upgrade pip


Collecting pip
  Downloading pip-9.0.2-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 1.2MB/s ta 0:00:01
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.2

In [15]:
from apyori import apriori

transactions = [
    ['beer', 'nuts', 'sugar'],
    ['beer', 'cheese', 'sugar'],
    ['beer', 'cheese'],
    ['beer', 'cheese', 'sugar'],
]
results = apriori(transactions)

In [16]:
results.printResults()


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-16-630f701587d7> in <module>()
----> 1 results.printResults()

AttributeError: 'generator' object has no attribute 'printResults'

In [ ]: