Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on Python 3.13 #593

Closed
veenstrajelmer opened this issue Oct 9, 2024 · 5 comments
Closed

Installation fails on Python 3.13 #593

veenstrajelmer opened this issue Oct 9, 2024 · 5 comments

Comments

@veenstrajelmer
Copy link

veenstrajelmer commented Oct 9, 2024

Minimal, reproducible code sample, a copy-pastable example if possible

pip install numcodecs in a python 3.13 environment (Windows 10 with conda in my case)

Problem description

Results in:

  ERROR: Failed building wheel for numcodecs
Failed to build numcodecs
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numcodecs)
Traceback from `pip install zarr` ``` (py313_env) c:\DATA>pip install zarr Collecting zarr Using cached zarr-2.18.3-py3-none-any.whl.metadata (5.7 kB) Collecting asciitree (from zarr) Using cached asciitree-0.3.3-py3-none-any.whl Requirement already satisfied: numpy>=1.24 in c:\users\veenstra\appdata\local\miniforge3\envs\py313_env\lib\site-packages (from zarr) (2.1.2) Collecting numcodecs>=0.10.0 (from zarr) Using cached numcodecs-0.13.0.tar.gz (5.9 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting fasteners (from zarr) Using cached fasteners-0.19-py3-none-any.whl.metadata (4.9 kB) Using cached zarr-2.18.3-py3-none-any.whl (210 kB) Using cached fasteners-0.19-py3-none-any.whl (18 kB) Building wheels for collected packages: numcodecs Building wheel for numcodecs (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for numcodecs (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [241 lines of output]
[numcodecs] setting up Blosc extension
[numcodecs] compiling Blosc extension with SSE2 support
[numcodecs] compiling Blosc extension with AVX2 support
[numcodecs] setting up Zstandard extension
[numcodecs] setting up LZ4 extension
[numcodecs] setting up compat extension
[numcodecs] setting up shuffle extension
[numcodecs] setting up vlen extension
[numcodecs] setting up fletcher32 extension
[numcodecs] setting up jenkins extension
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\abc.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\astype.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\base64.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\bitround.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\bz2.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\categorize.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\checksum32.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\compat.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\delta.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\fixedscaleoffset.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\gzip.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\json.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\lzma.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\msgpacks.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\ndarray_like.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\packbits.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\pcodec.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\pickles.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\quantize.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\registry.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\shuffle.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\version.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\zfpy.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs\zlib.py -> build\lib.win-amd64-cpython-313\numcodecs
copying .\numcodecs_init_.py -> build\lib.win-amd64-cpython-313\numcodecs
creating build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\common.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_astype.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_base64.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_bitround.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_blosc.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_bz2.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_categorize.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_checksum32.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_compat.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_delta.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_entrypoints.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_entrypoints_backport.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_fixedscaleoffset.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_fletcher32.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_gzip.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_jenkins.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_json.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_lz4.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_lzma.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_msgpacks.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_ndarray_like.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_packbits.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_pcodec.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_pickles.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_quantize.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_registry.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_shuffle.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_vlen_array.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_vlen_bytes.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_vlen_utf8.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_zfpy.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_zlib.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests\test_zstd.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
copying .\numcodecs\tests_init_.py -> build\lib.win-amd64-cpython-313\numcodecs\tests
running egg_info
writing numcodecs.egg-info\PKG-INFO
writing dependency_links to numcodecs.egg-info\dependency_links.txt
writing requirements to numcodecs.egg-info\requires.txt
writing top-level names to numcodecs.egg-info\top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'numcodecs.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'numcodecs.egg-info\SOURCES.txt'
C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\command\build_py.py:218: _Warning: Package 'numcodecs.tests.package_with_entrypoint' is absent from the packages configuration.

    # Package would be ignored #
    Python recognizes 'numcodecs.tests.package_with_entrypoint' as an importable package[^1],
    but it is absent from setuptools' `packages` configuration.
    
    This leads to an ambiguous overall configuration. If you want to distribute this
    package, please make sure that 'numcodecs.tests.package_with_entrypoint' is explicitly added
    to the `packages` configuration field.
    
    Alternatively, you can also rely on setuptools' discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).
    
    You can read more about "package discovery" on setuptools documentation page:
    
    - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
    
    If you don't want 'numcodecs.tests.package_with_entrypoint' to be distributed and are
    already explicitly excluding 'numcodecs.tests.package_with_entrypoint' via
    `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
    you can try to use `exclude_package_data`, or `include-package-data=False` in
    combination with a more fine grained `package-data` configuration.
    
    You can read more about "package data files" on setuptools documentation page:
    
    - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
    
    
    [^1]: For Python, any directory (with suitable naming) can be imported,
          even if it does not contain any `.py` files.
          On the other hand, currently there is no concept of package data
          directory, all directories are treated like packages.

    check.warn(importable)
  creating build\lib.win-amd64-cpython-313\numcodecs\tests\package_with_entrypoint
  copying .\numcodecs\tests\package_with_entrypoint\__init__.py -> build\lib.win-amd64-cpython-313\numcodecs\tests\package_with_entrypoint
  creating build\lib.win-amd64-cpython-313\numcodecs\tests\package_with_entrypoint-0.1.dist-info
  copying .\numcodecs\tests\package_with_entrypoint-0.1.dist-info\entry_points.txt -> build\lib.win-amd64-cpython-313\numcodecs\tests\package_with_entrypoint-0.1.dist-info
  running build_ext
  Compiling numcodecs/blosc.pyx because it changed.
  [1/1] Cythonizing numcodecs/blosc.pyx
  building 'numcodecs.blosc' extension
  [numcodecs] Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  Traceback (most recent call last):
    File "<string>", line 338, in build_extension
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\Cython\Distutils\build_ext.py", line 135, in build_extension
      super(build_ext, self).build_extension(ext)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 557, in build_extension
      objects = self.compiler.compile(
          sources,
      ...<5 lines>...
          depends=ext.depends,
      )
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 379, in compile
      self.initialize()
      ~~~~~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 289, in initialize
      vc_env = _get_vc_env(plat_spec)
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 150, in _get_vc_env
      raise DistutilsPlatformError(
      ...<3 lines>...
      )
  distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\veenstra\AppData\Local\miniforge3\envs\py313_env\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
      ~~~~^^
    File "C:\Users\veenstra\AppData\Local\miniforge3\envs\py313_env\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\veenstra\AppData\Local\miniforge3\envs\py313_env\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,
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                          metadata_directory)
                                          ^^^^^^^^^^^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\build_meta.py", line 421, in build_wheel
      return self._build_with_temp_dir(
             ~~~~~~~~~~~~~~~~~~~~~~~~~^
          ['bdist_wheel'],
          ^^^^^^^^^^^^^^^^
      ...<3 lines>...
          self._arbitrary_args(config_settings),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      )
      ^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\build_meta.py", line 403, in _build_with_temp_dir
      self.run_setup()
      ~~~~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
      ~~~~^^^^^^^^^^^^^^^^
    File "<string>", line 383, in <module>
    File "<string>", line 374, in run_setup
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
             ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
      return run_commands(dist)
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
      dist.run_commands()
      ~~~~~~~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
      self.run_command(cmd)
      ~~~~~~~~~~~~~~~~^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\dist.py", line 950, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 398, in run
      self.run_command("build")
      ~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
      self.distribution.run_command(command)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\dist.py", line 950, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
      ~~~~~~~~~~~~~~~~^^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
      self.distribution.run_command(command)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\dist.py", line 950, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "<string>", line 331, in run
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
      self.build_extensions()
      ~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 476, in build_extensions
      self._build_extensions_serial()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\veenstra\AppData\Local\Temp\pip-build-env-9vdrdn1g\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 502, in _build_extensions_serial
      self.build_extension(ext)
      ~~~~~~~~~~~~~~~~~~~~^^^^^
    File "<string>", line 341, in build_extension
  BuildFailed
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numcodecs
Failed to build numcodecs
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numcodecs)

</details>
@dstansby
Copy link
Contributor

dstansby commented Oct 9, 2024

Thanks for reporting, this is a known issue that is fixed, we just need to do a release.

@veenstrajelmer
Copy link
Author

Great, thanks a lot for the quick reply. I could not find a (closed) issue related to it (I guess it might be #553 in hindsight), so assumed it was not yet resolved. Great to hear that it is though.

@dstansby
Copy link
Contributor

dstansby commented Oct 9, 2024

Should work now, 0.13.1 is up on PyPi 🚀

@dstansby dstansby closed this as completed Oct 9, 2024
@veenstrajelmer
Copy link
Author

Great, indeed it works now, thanks a lot!

@jakirkham
Copy link
Member

Similar work is being done in conda-forge with PR: conda-forge/numcodecs-feedstock#110

@dstansby could you please review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants