栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

安装Phoenix时,执行./splline.py报错File “./sqlline.py“, line 25, in <module> import phoenix

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

安装Phoenix时,执行./splline.py报错File “./sqlline.py“, line 25, in <module> import phoenix

 安装Phoenix时,执行./splline.py报错File “./sqlline.py“, line 25, in <module> import phoenix_utils File,如下图所示:

(base) [root@node1 bin]# ./sqlline.py node1:2181
Traceback (most recent call last):
  File "./sqlline.py", line 25, in 
    import phoenix_utils
  File "/export/server/apache-phoenix-5.0.0-HBase-2.0-bin/bin/phoenix_utils.py", line 208
    print "phoenix_class_path:", phoenix_class_path
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("phoenix_class_path:", phoenix_class_path)?

解决方法:
可以使用:/usr/bin/python2 ./sqlline.py node1:2181 来启动Phoenix服务。

Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:node1:2181 none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:node1:2181
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/export/server/apache-phoenix-5.0.0-HBase-2.0-bin/phoenix-5.0.0-HBase-2.0-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/export/server/hadoop-3.3.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
22/06/06 22:37:28 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Connected to: Phoenix (version 5.0)
Driver: PhoenixEmbeddedDriver (version 5.0)
Autocommit status: true
Transaction isolation: TRANSACTION_READ_COMMITTED
Building list of tables and columns for tab-completion (set fastconnect to true to skip)...
133/133 (100%) Done
Done
sqlline version 1.2.0

报这种错误的原因是因为我们现在用的python3的版本,而Phoenix需要python2来启动,直接运行有可能运行了python3。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/954379.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号