chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/chdb
Apache License 2.0
2.13k stars 75 forks source link

Add arm64 build (and install from source) #56

Closed blackrez closed 1 year ago

blackrez commented 1 year ago

Hello,

I tried to install chdb on ubuntu arm64 and I've got this error from pip

(venv) ubuntu@ip-172-31-31-61:~$ pip install chdb
ERROR: Could not find a version that satisfies the requirement chdb (from versions: none)
ERROR: No matching distribution found for chdb

Is it possible to add the source on pypi or arm64 build (or both 😉 )?

Thanks

lmangani commented 1 year ago

Hello @blackrez You need Python 3.8 or higher in order to use chdb Could you confirm this is the case?

blackrez commented 1 year ago

Hello @lmangani,

I use python3.11, if you go to the file pypi page, the source distribution is empty. So if you use a version not supported by binary files it will not work.

lmangani commented 1 year ago

You're right we only build arm64 images for OSX at this time. On the next major source resync we'll do our best to include Linux arm64 builds.

If you have some time and compute you can perform a manual build by following the steps in our action

auxten commented 1 year ago

Hello @lmangani,

I use python3.11, if you go to the file pypi page, the source distribution is empty. So if you use a version not supported by binary files it will not work.

GitHub action did not provide arm64 for macOS or Linux. I have to build the macOS arm64 on my M1 MacBook manually. But sadly, I don't have an arm64 Linux machine. I will try to get an AWS Graviton machine later.

https://github.com/actions/runner-images/issues/5631

For python sdist, it does not work on chDB. The whole source code includes 100+ submodules and is more than 5GiB. It takes more than 9 hours to build chDB from source on Github Action.

blackrez commented 1 year ago

I could give a try on AWS graviton.

YoKv commented 1 year ago

is it possible to provide windows build? it make sense to develop desktop application

auxten commented 1 year ago

is it possible to provide windows build? it make sense to develop desktop application

No, ClickHouse doesn't support build on Windows. But you can run chDB or ClickHouse on wsl2 which is tested.

auxten commented 1 year ago

Trying to fix that #69

lmangani commented 1 year ago

Update for @blackrez and anyone else tuned in - arm64 builds for libchdb are now succeeding and we should have (linux) python releases soon!

lmangani commented 1 year ago

Great news! arm64/aarch64 builders are now successfully implemented all across:

lmangani commented 1 year ago

@blackrez wheels are out, could you perhaps check and confirm if this works for you? https://pypi.org/project/chdb/#files

Thanks!

lmangani commented 1 year ago

Tested and Closing as successful. Any input welcome!

$ pip install chdb --upgrade --force-reinstall
Collecting chdb
  Obtaining dependency information for chdb from https://files.pythonhosted.org/packages/a8/47/aa128b863773c4f23652a1c088ca12a95e37360332d00ec20152fc49230b/chdb-0.11.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata
  Downloading chdb-0.11.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (11 kB)
Downloading chdb-0.11.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (90.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.0/90.0 MB 5.6 MB/s eta 0:00:00
Installing collected packages: chdb
  Attempting uninstall: chdb
    Found existing installation: chdb 0.11.4
    Uninstalling chdb-0.11.4:
      Successfully uninstalled chdb-0.11.4
Successfully installed chdb-0.11.4

$ python3 -m chdb "SELECT version()"
"23.6.1.1"
blackrez commented 1 year ago

Sorry for the late, but I confirm it works great on AWS graviton. Thank you all for the work.