questdb / py-questdb-client

Python client for QuestDB InfluxDB Line Protocol
https://py-questdb-client.readthedocs.io
Apache License 2.0
49 stars 7 forks source link

Pip install fails on python 3.12 #81

Open nicholas-a-guerra opened 3 months ago

nicholas-a-guerra commented 3 months ago

When trying to install the questdb client using pip, it fails when using 3.12. It fails with both pip install questdb and with pip install questdb[dataframe]. Seems to be something related to dataframe.pxi.

Python version: 3.12.2 Pip version: 24.0

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting questdb
  Using cached questdb-2.0.2.tar.gz (864 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      Traceback (most recent call last):
        File "/home/nebula/test-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/nebula/test-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/nebula/test-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 172, in <module>
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1010, in cythonize
          module_list, module_metadata = create_extension_list(
                                         ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 859, in create_extension_list
          kwds = deps.distutils_info(file, aliases, base).values
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 707, in distutils_info
          return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 716, in transitive_merge
          return self.transitive_merge_helper(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 722, in transitive_merge_helper
          deps = extract(node)
                 ^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 687, in distutils_info0
          cimports, externs, incdirs = self.cimports_externs_incdirs(filename)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "Cython/Utils.py", line 129, in Cython.Utils.cached_method.wrapper
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 574, in cimports_externs_incdirs
          for include in self.included_files(filename):
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "Cython/Utils.py", line 129, in Cython.Utils.cached_method.wrapper
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 556, in included_files
          include_path = self.context.find_include_file(include, source_file_path=filename)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py", line 299, in find_include_file
          error(pos, "'%s' not found" % filename)
        File "/tmp/pip-build-env-758g3lhi/overlay/lib/python3.12/site-packages/Cython/Compiler/Errors.py", line 178, in error
          raise InternalError(message)
      Cython.Compiler.Errors.InternalError: Internal compiler error: 'dataframe.pxi' not found
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
amunra commented 3 months ago

It seems like it's attempting to rebuild from source and failing. It should be just using the pre-built binaries. I.e. one of these: https://pypi.org/project/questdb/#files

What OS / architecture are you on? What exact Python version are you running?

amunra commented 3 months ago

I've split this issue into two:

nicholas-a-guerra commented 2 months ago

Python 3.12.2 Raspberry Pi OS on a CM4

I can get the exact os details if needed