timeplus-io / proton-python-driver

Python driver for Timeplus Enterprise or Timeplus Proton
https://timeplus.com
Other
12 stars 3 forks source link

Support for arch64 (macOS -M1) #39

Closed neodino closed 8 months ago

neodino commented 9 months ago

Describe the bug

Getting error bellow. Tried to build but got same error. Any idea?

ile "/bytewax/.venv/lib/python3.11/site-packages/proton_driver/__init__.py", line 2, in <module>
    from .client import Client
  File "/bytewax/.venv/lib/python3.11/site-packages/proton_driver/client.py", line 9, in <module>
    from .block import ColumnOrientedBlock, RowOrientedBlock
  File "/bytewax/.venv/lib/python3.11/site-packages/proton_driver/block.py", line 1, in <module>
    from .reader import read_varint, read_binary_uint8, read_binary_int32
  File "/bytewax/.venv/lib/python3.11/site-packages/proton_driver/reader.py", line 3, in <module>
    from .varint import read_varint
ImportError: dlopen(/bytewax/.venv/lib/python3.11/site-packages/proton_driver/varint.cpython-311-darwin.so, 0x0002): tried: '/bytewax/.venv/lib/python3.11/site-packages/proton_driver/varint.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/bytewax/.venv/lib/python3.11/site-packages/proton_driver/varint.cpython-311-darwin.so' (no such file), '/bytewax/.venv/lib/python3.11/site-packages/proton_driver/varint.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

To Reproduce Using the byte wax example from the repo Expected behavior Run ok. Versions

chenziliang commented 9 months ago

Thanks for reporting this. We will look into this.

gangtao commented 8 months ago

I made a quick test using mac m2 pro and I did not hit any error , maybe need to check it using m1 cpu specifically

python --version
Python 3.11.7
(.venv) gangtao@Gangs-MacBook-Pro timeplus % sysctl -n machdep. cpu. brand_string
12
12
12
12
Apple M2 Pro
0
leo-cai-timeplus commented 8 months ago

@neodino Can you try https://github.com/timeplus-io/proton-python-driver/releases/download/v0.2.10/proton_driver-0.2.10-cp311-cp311-macosx_11_0_arm64.whl, recently built.

neodino commented 8 months ago

@neodino Can you try https://github.com/timeplus-io/proton-python-driver/releases/download/v0.2.10/proton_driver-0.2.10-cp311-cp311-macosx_11_0_arm64.whl, recently built.

Yep, all ok now. Please close ticket. Thanks!

jovezhong commented 8 months ago

BTW, @neodino I just updated the bytewax example, now you can simply start the docker compose to get a working live dashboard in Grafana to visualize the hackernews live feed. Please check https://github.com/timeplus-io/proton-python-driver/tree/develop/example/bytewax for details and let us know your feedback.