首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用Python连接rethinkdb

无法使用Python连接rethinkdb
EN

Stack Overflow用户
提问于 2018-01-22 20:08:52
回答 1查看 906关注 0票数 0

我正在尝试使用Python连接Rethinkdb。我在ubuntu上使用pip install rethinkdb成功地安装了rethinkdb。但我尝试使用python连接rethinkdb,如下所示:

代码语言:javascript
复制
import rethinkdb as r
conn=r.connect().repl()

我在连接时收到以下错误:

代码语言:javascript
复制
ethinkdb.errors.ReqlDriverError: Could not connect to localhost:28015. Error: [Errno 111] Connection refused

another post中,我发现如果我们有不同的rethinkdb驱动版本和服务器版本,就会出现这个问题。我能够找到rethinkdb版本,使用

代码语言:javascript
复制
pip freeze 

它提供了以下内容:

代码语言:javascript
复制
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时,它给出了错误。如下截图所示。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-22 20:16:01

你的服务器正在运行吗?您能在终端中显示执行以下命令的结果吗?

代码语言:javascript
复制
ps aux | grep rethinkdb
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48381290

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档