查看: 320|回复: 3

[转载] 嵌入式ClickHouse来袭,Python+CH无缝结合打开新世界

[复制链接]
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
发表于 2023-9-11 08:33 | 显示全部楼层 |阅读模式
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
 楼主| 发表于 2023-9-12 21:29 来自手机 | 显示全部楼层
在 termux proot中装上了
root@localhost:~# apt install python3.10
Reading package lists... Done
root@localhost:~# curl -LO https://bootstrap.pypa.io/get-pip.py -C -
** Resuming transfer from byte position 1319488
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1255k  100 1255k    0     0  23731      0  0:00:54  0:00:54 --:--:-- 17774
root@localhost:~# python3 get-pip.py
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
root@localhost:~# curl -LO  https://bootstrap.pypa.io/pip/pip.pyz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2007k  100 2007k    0     0   330k      0  0:00:06  0:00:06 --:--:--  489k
root@localhost:~# python3 pip.pyz install chdb -i https://pypi.tuna.tsinghua.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting chdb
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/be/bd/0a54cd48e1b4f39f80c2a973ab2c4d58eb86fa0ba19600fdf3056293ff1e/chdb-0.14.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (90.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.0/90.0 MB 6.6 MB/s eta 0:00:00
Installing collected packages: chdb
Successfully installed chdb-0.14.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@localhost:~# python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import chdb
>>> chdb.query('select version()')
"23.6.1.1"

>>> exit()
root@localhost:~# python3 -m chdb "SELECT 1,'abc'" Pretty
┏━━━┳━━━━━━━┓
┃ 1 ┃ 'abc' ┃
┡━━━╇━━━━━━━┩
│ 1 │ abc   │
└───┴───────┘
root@localhost:~# python3 -m chdb "SELECT sum(number) from numbers(100000000)" Pretty
┏━━━━━━━━━━━━━━━━━━┓
┃      sum(number) ┃
┡━━━━━━━━━━━━━━━━━━┩
│ 4999999950000000 │
└──────────────────┘

使用道具 举报

回复
论坛徽章:
1
优秀写手
日期:2014-10-28 06:00:13
发表于 2023-9-13 15:08 | 显示全部楼层
想想如何把 SPL 集算器 集成到python里面,这就是一花一世界了。

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
 楼主| 发表于 2023-9-14 08:59 | 显示全部楼层

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表