apache / datasketches-python

Apache datasketches
https://datasketches.apache.org
Apache License 2.0
22 stars 4 forks source link

Update wheels for Python 3.12 #39

Closed RNarayan73 closed 9 months ago

RNarayan73 commented 10 months ago

Installation on a Python 3.12 environment with the following error:

(skl312) PS C:\Users\naray\Python\venvs\skl312> pip install "datasketches (==4.1.0)"

Collecting datasketches==4.1.0
  Downloading datasketches-4.1.0.tar.gz (605 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 605.0/605.0 kB 2.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\naray\python\venvs\skl312\lib\site-packages (from datasketches==4.1.0) (1.26.3)
Building wheels for collected packages: datasketches
  Building wheel for datasketches (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for datasketches (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\DensityWrapper.py -> build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\KernelFunction.py -> build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\PySerDe.py -> build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\TuplePolicy.py -> build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\TupleWrapper.py -> build\lib.win-amd64-cpython-312\datasketches
      copying python\datasketches\__init__.py -> build\lib.win-amd64-cpython-312\datasketches
      running build_ext
      -- Building for: NMake Makefiles
      CMake Error at CMakeLists.txt:25 (project):
        Generator

          NMake Makefiles

        does not support platform specification, but platform

          x64

        was specified.

      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "C:\Users\naray\Python\venvs\skl312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\naray\Python\venvs\skl312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\naray\Python\venvs\skl312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\build_meta.py", line 389, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 93, in <module>
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\naray\AppData\Local\Temp\pip-build-env-sk3lhnft\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 46, in run
        File "<string>", line 77, in build_extension
        File "C:\Users\naray\Python\Python312\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-xmvqykcf\\datasketches_1521b01dbb27497f9ab41baf0948b4cd', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-xmvqykcf\\datasketches_1521b01dbb27497f9ab41baf0948b4cd\\build\\lib.win-amd64-cpython-312', '-DWITH_PYTHON=True', '-DCMAKE_CXX_STANDARD=11', '-DPython3_EXECUTABLE=C:\\Users\\naray\\Python\\venvs\\skl312\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-xmvqykcf\\datasketches_1521b01dbb27497f9ab41baf0948b4cd\\build\\lib.win-amd64-cpython-312', '-T', 'host=x64', '-DCMAKE_GENERATOR_PLATFORM=x64']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for datasketches
Failed to build datasketches
ERROR: Could not build wheels for datasketches, which is required to install pyproject.toml-based projects

Can you please update the wheels for Python 3.12?

Thanks Narayan

jmalkin commented 10 months ago

We have a 5.0.0 python release candidate up for a vote as part of the Apache release process. The mailing list thread is here: https://lists.apache.org/thread/2bmbyl5otof9fzch4nlvhxsb04g9ghl3

That includes wheels for 3.12.

jmalkin commented 9 months ago

@RNarayan73 - I'm not publishing to pypi since there's an issue with all the arm64 mac wheels, but until 5.0.1 is published you can try grabbing this wheel from the official Apache distribution repo: https://dist.apache.org/repos/dist/release/datasketches/python/5.0.0/pypi/datasketches-5.0.0-cp312-cp312-win_amd64.whl

The directory also contains the GPG signature and SHA512 checksums, which you should certainly check and verify.

The release repo has only the latest release, so that one will go away around the same time 5.0.1 ends up in pypi, assuming we don't find other issues. In the meantime, I apologize for the delay on this.

jmalkin commented 9 months ago

This is finally officially released. v5.0.1 should be available for install from pypi, including for Python 3.12 on WIndows.

Closing this but please let us know if there are any problems.