0

I started out trying to install ChatterBot-master from Github on Windows 10 with Python 3.5, but it threw an unmet dependency error for jsondb.

After trying pip:

PS C:\Users\hackr> pip install jasondb
Collecting jasondb
  Could not find a version that satisfies the requirement jasondb (from versions: )
No matching distribution found for jasondb
PS C:\Users\hackr> pip3 install jasondb
Collecting jasondb
  Could not find a version that satisfies the requirement jasondb (from versions: )
No matching distribution found for jasondb

So I installed jsondb0.1.2 following the instructions on python.org . Unfortunately, it returned a few errors:

C:\Users\hackr\Downloads\jsondb-0.1.2>python setup.py install
C:\python35\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'zip_s
  warnings.warn(msg)
C:\python35\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'insta
  warnings.warn(msg)
running install
running build
running build_py
running install_lib
byte-compiling C:\python35\Lib\site-packages\jsondb\backends\sqlite3_backend.py to sqli
  File "C:\python35\Lib\site-packages\jsondb\backends\sqlite3_backend.py", line 214
    def insert_root(self, (root_type, value)):
                          ^
SyntaxError: invalid syntax

byte-compiling C:\python35\Lib\site-packages\jsondb\core.py to core.cpython-35.pyc
  File "C:\python35\Lib\site-packages\jsondb\core.py", line 197
    print parent_id, parent_type
                  ^
SyntaxError: Missing parentheses in call to 'print'

byte-compiling C:\python35\Lib\site-packages\jsondb\pyPEG.py to pyPEG.cpython-35.pyc
  File "C:\python35\Lib\site-packages\jsondb\pyPEG.py", line 39
    word_regex = re.compile(ur"\w+")
                                  ^
SyntaxError: invalid syntax

byte-compiling C:\python35\Lib\site-packages\jsondb\__init__.py to __init__.cpython-35.
  File "C:\python35\Lib\site-packages\jsondb\__init__.py", line 40
    print row
            ^
SyntaxError: Missing parentheses in call to 'print'

running install_egg_info
Removing C:\python35\Lib\site-packages\jsondb-0.1.2-py3.5.egg-info
Writing C:\python35\Lib\site-packages\jsondb-0.1.2-py3.5.egg-info

I went ahead and tried to install ChatterBot-master again, but it returned errors which seem to be related to the warnings/errors from the jasondb installation:

C:\Users\hackr\Downloads\ChatterBot-master>python setup.py install
Traceback (most recent call last):
  File "setup.py", line 13, in <module>
    version = __import__('chatterbot').__version__
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\__init__.py", line 1, in <module>
    from .chatterbot import ChatBot
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\chatterbot.py", line 1, in <module>
    from .adapters import Adaptation
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\adapters\__init__.py", line 2, in <module>
    from .adaptation import Adaptation
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\adapters\adaptation.py", line 2, in <module>
    from chatterbot.adapters.storage import StorageAdapter
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\adapters\storage\__init__.py", line 2, in <module>
    from .jsondatabase import JsonDatabaseAdapter
  File "C:\Users\hackr\Downloads\ChatterBot-master\chatterbot\adapters\storage\jsondatabase.py", line 4, in <module>
    from jsondb import Database
  File "C:\python35\lib\site-packages\jsondb\__init__.py", line 40
    print row
            ^
SyntaxError: Missing parentheses in call to 'print'
Hack-R
  • 22,422
  • 14
  • 75
  • 131

1 Answers1

1

The jsondb.0.1.2 you installed is for Python2, yet. Instead, install this version, 0.1.1.

Iron Fist
  • 10,739
  • 2
  • 18
  • 34