Package: canner-python-client
IntroductionThis package provides a client interface to query Canner
a distributed SQL engine. It supports Python 3.6.x, 3.7.x and 3.8.x.Old package versions If neededIf you would like to download old versions which smaller than0.37.x( <0.37.x), please go tocannerflow-python-clientpage.Installation$ pip install canner-python-clientQuick StartClientimportcanner# bootstrap canner client with credentialsclient=canner.client.bootstrap(endpoint='https://web.default.myname.apps.canner.com',workspace_id='444e8753-a4c0-4875-bdc0-834c79061d56',token='Y2xpZW50XzA0OTgzODM4LWNhZjktNGNmZi1hNDA4LWFkZDY3ZDc5MjIxNjo2N2YyNGY5OWEzYjFiZTEyZTg2MDI2MmMzNGQzZDRiYQ==')# generate simple tpch queryquery=client.gen_query('select * from tpch.tiny.region',data_format='list')query.wait_for_finish()# get all data with `get_all()` and data will be list of rowsdata=query.get_all()Please change yourendpoint,workspace_idandtokenaccording to your canner web environment.Installingcanner-python-clientissues1. ShowCouldn't find index page for 'xxx' (maybe misspelled?)when installing dependency packagefastparquetstageIf you're installing ourcanner-python-clientby pip, and meet these message:Couldn't find index page for 'xxx' (maybe misspelled?)E.g:numpy,pytest-runnerfollowed the errordistutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('xxxx'),Solution:then please install these package by hand throughpip installcommand, and make sure the dependency package exist on PyPI, like below:# If you face the issue for numpy$>pipinstallnumpy==1.19.5# recommend version for our package# If you face the issue for pytest-runner$>pipinstallpytest-runner==5.3.1# recommend version for our package2. ShowRuntimeError: Python version >= 3.x required.when installing dependency packagefastparquetstage in Python 3.6.xThis error may happen on installing dependency packagefastparquetstage and occurs whenfastparquetinstallnumpyversion, but thenumpymay install latest version fromfastparquetso it needPython version >= 3.xrequired,
Even our packagesetup.pyadd installingnumpy==1.19.5ornumpy>=1.19.5beforefastparquet.Reason:because python will download all package first, so at that time if ourpip listnot containsnumpy,fastparquetnot foundnumpy, so it will download byfastparquetrule.Solution:You could installnumpy 1.19.5version (recommend) bypip installbefore installingcanner-python-clientto prevent the issue.$>pipinstallnumpy==1.19.5
$>pipinstallcanner-python-client3. Show error for current installing numba needed numpy version and installed numpy version is incompatibleWhen downloadingcanner-python-clientunder python3.8.x, it will encounternumpyandnumbaversion conflicts.The error message will like the below (the error message for numba needed numpy version may be different on your system installed numpy version):Here is an error message sample, your version of numba and numpy may be different on your system:ERROR:numba0.55.0hasrequirementnumpy<1.22,>=1.18,butyou'llhavenumpy1.22.1whichisincompatible.Solution:you could installnumba 0.53.xandnumpy 1.22.xfirst# Example 1:$>pipinstallnumba==0.53
$>pipinstallnumpy==1.22.0
$>pipinstallcanner-python-client# Example 2:$>pipinstallnumba==0.53.1
$>pipinstallnumpy==1.22.4
$>pipinstallcanner-python-client4. Show errors when python client installing dependency package "pyarrow"When you installingcanner-python-clientunder the Mac M1 platform, it will shows the errors forERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projectswhen thepython version < 3.8.
The reason is that the used dependency packagepyarrownot havepyarrowwheels for M1 platform, if you would like to installcanner-python-clientsuccessfully, please try to upgrade python version topython 3.8.xor not use Mac M1 platform....ERROR:Failedbuildingwheelforpyarrow
Failedtobuildpyarrow
ERROR:Couldnotbuildwheelsforpyarrow,whichisrequiredtoinstallpyproject.toml-basedprojectsLearn morePlease learn more fromCanner Official DocumentPython Client Document