|

楼主 |
发表于 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 │
└──────────────────┘ |
|