2016-01-04 66 views
0

我開始嘗試從Github上安裝ChatterBot-master,在Windows 10上使用Python 3.5,但它爲jsondb拋出了一個未滿足的依賴關係錯誤。Windows中的jasondb Python 3.5

試圖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 

所以我下面就python.org的說明安裝jsondb0.1.2。不幸的是,它返回了一些錯誤:

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 

我繼續嘗試重新安裝ChatterBot-master,但它返回它似乎是相關的警告錯誤/從jasondb安裝錯誤:

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' 
+0

您安裝的'jsondb'是用於Python2的,而且您正在使用Python3我猜? –

回答

1

您安裝的jsondb.0.1.2是針對Python2的。相反,請安裝this版本,0.1.1。