无法使用 Python 连接 rethinkdb
Unable to connect rethinkdb using Python
我正在尝试使用 Python 连接 Rethinkdb。我成功地安装了 rethinkdb 使用
pip 在 ubuntu 上安装 rethinkdb。但我尝试使用 python 连接 rethinkdb,如下所示:
import rethinkdb as r
conn=r.connect().repl()
我在连接时遇到以下错误:
ethinkdb.errors.ReqlDriverError: Could not connect to localhost:28015. Error: [Errno 111] Connection refused
在another post中我发现如果我们有不同的rethinkdb 驱动程序版本和服务器版本,就会出现这个问题。我能够找到 rethinkdb 版本
使用
pip freeze
它给出了以下内容:
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
bleach==2.1.2
boto==2.38.0
cassandra-driver==3.12.0
certifi==2017.11.5
chardet==2.3.0
click==6.7
configparser==3.5.0
cryptography==1.2.3
decorator==4.1.2
duplicity==0.7.6
entrypoints==0.2.3
enum34==1.1.2
Flask==0.12.2
functools32==3.2.3.post2
futures==3.2.0
html5lib==1.0.1
idna==2.0
ipaddress==1.0.16
ipykernel==4.7.0
ipython==5.5.0
ipython-genutils==0.2.0
ipywidgets==7.0.5
itsdangerous==0.24
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.0
jupyter-console==5.2.0
jupyter-core==4.4.0
lockfile==0.12.2
MarkupSafe==1.0
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
ndg-httpsclient==0.4.0
notebook==5.2.2
pandocfilters==1.4.2
pathlib2==2.3.0
pexpect==4.3.1
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
pyasn1==0.1.9
Pygments==2.2.0
pygobject==3.20.0
pyOpenSSL==0.15.1
python-cloudfiles==1.7.10
python-dateutil==2.6.1
pyxdg==0.25
pyzmq==16.0.3
qtconsole==4.3.1
requests==2.9.1
rethinkdb==2.3.0.post6
scandir==1.6
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
terminado==0.8.1
testpath==0.3.1
tornado==4.5.2
traitlets==4.3.2
urllib3==1.13.1
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.12.2
widgetsnbextension==3.0.8
Rethinkdb版本有,但是不知道怎么查看服务器版本。请帮我解决这个问题。
启动 virtualenv 后,当我尝试启动 rethinkdb 时出现错误。
如以下屏幕截图所示。
你的服务器是运行吗?你能在终端中显示执行以下命令的结果吗?
ps aux | grep rethinkdb
我正在尝试使用 Python 连接 Rethinkdb。我成功地安装了 rethinkdb 使用 pip 在 ubuntu 上安装 rethinkdb。但我尝试使用 python 连接 rethinkdb,如下所示:
import rethinkdb as r
conn=r.connect().repl()
我在连接时遇到以下错误:
ethinkdb.errors.ReqlDriverError: Could not connect to localhost:28015. Error: [Errno 111] Connection refused
在another post中我发现如果我们有不同的rethinkdb 驱动程序版本和服务器版本,就会出现这个问题。我能够找到 rethinkdb 版本 使用
pip freeze
它给出了以下内容:
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
bleach==2.1.2
boto==2.38.0
cassandra-driver==3.12.0
certifi==2017.11.5
chardet==2.3.0
click==6.7
configparser==3.5.0
cryptography==1.2.3
decorator==4.1.2
duplicity==0.7.6
entrypoints==0.2.3
enum34==1.1.2
Flask==0.12.2
functools32==3.2.3.post2
futures==3.2.0
html5lib==1.0.1
idna==2.0
ipaddress==1.0.16
ipykernel==4.7.0
ipython==5.5.0
ipython-genutils==0.2.0
ipywidgets==7.0.5
itsdangerous==0.24
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.0
jupyter-console==5.2.0
jupyter-core==4.4.0
lockfile==0.12.2
MarkupSafe==1.0
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
ndg-httpsclient==0.4.0
notebook==5.2.2
pandocfilters==1.4.2
pathlib2==2.3.0
pexpect==4.3.1
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
pyasn1==0.1.9
Pygments==2.2.0
pygobject==3.20.0
pyOpenSSL==0.15.1
python-cloudfiles==1.7.10
python-dateutil==2.6.1
pyxdg==0.25
pyzmq==16.0.3
qtconsole==4.3.1
requests==2.9.1
rethinkdb==2.3.0.post6
scandir==1.6
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
terminado==0.8.1
testpath==0.3.1
tornado==4.5.2
traitlets==4.3.2
urllib3==1.13.1
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.12.2
widgetsnbextension==3.0.8
Rethinkdb版本有,但是不知道怎么查看服务器版本。请帮我解决这个问题。
启动 virtualenv 后,当我尝试启动 rethinkdb 时出现错误。
如以下屏幕截图所示。
你的服务器是运行吗?你能在终端中显示执行以下命令的结果吗?
ps aux | grep rethinkdb