Skip to content

Conversation

@JSchuurmans
Copy link

When installing dependencies via pip on Mac M1 or M2 installing tables is not trivial and throws an error (see below) because wheels of tables for this hardware is not available and building depends on hdf5.

The solution is to exclude the install of tables via environment markers in the requirements-dev.txt. This file is generated by scripts/generate_pip_deps_from_conda.py.

This commit adds the following functionality to scripts/generate_pip_deps_from_conda.py:

  • Adding environment markers to dependencies specified in ADD_ENV_MARKERS.

  • Allow multiple operations on the same package (add env markers, rename package and remap version).

  • closes #xxxx (Replace xxxx with the GitHub issue number)

  • Tests added and passed if fixing a bug or adding a new feature

  • All code checks passed.

  • Added type annotations to new arguments/methods/functions.

  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

error installing tables

Collecting tables Using cached tables-3.8.0.tar.gz (8.0 MB) 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 ╰─> [11 lines of output] <string>:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ld: library not found for -lhdf5 clang: error: linker command failed with exit code 1 (use -v to see invocation) cpuinfo failed, assuming no CPU features: 'flags' * Using Python 3.10.10 (main, Apr 20 2023, 14:37:50) [Clang 14.0.0 (clang-1400.0.29.202)] * Found cython 3.0.2 * USE_PKGCONFIG: True .. ERROR:: Could not find a local HDF5 installation. You may need to explicitly state where your local HDF5 headers and library can be found by setting the ``HDF5_DIR`` environment variable or by using the ``--hdf5`` command-line option. [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.``` 
JSchuurmans and others added 2 commits September 16, 2023 16:41
Co-authored-by: BLannoo <brunolannoo@gmail.com>
@jorisvandenbossche jorisvandenbossche added the Sprints Sprint Pull Requests label Sep 16, 2023
@jorisvandenbossche jorisvandenbossche changed the title Add env markers for pytables. Allow multiple operations on same package. DEV: don't install tables on MacOS ARM in dev requirements.txt (add env markers) Sep 17, 2023
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a nice solution with the helper functions, thanks again @JSchuurmans and @BLannoo!

@lithomas1 lithomas1 added this to the 2.2 milestone Sep 19, 2023
@jorisvandenbossche
Copy link
Member

@JSchuurmans do you have time to update for my small comment?

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Copy link
Author

@JSchuurmans JSchuurmans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment on why tables is excluded for mac with arm.

@JSchuurmans
Copy link
Author

@jorisvandenbossche Your comment looks good, updated the branch accordingly.

@JSchuurmans
Copy link
Author

I will have a look at the formatting later this week.

@JSchuurmans
Copy link
Author

@jorisvandenbossche , I made it complient with ruff :)

@simonjayhawkins simonjayhawkins added the OS X Related to Mac OS & hardware issues (M1) label Oct 18, 2023
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Nov 18, 2023
@jorisvandenbossche jorisvandenbossche modified the milestones: 2.2, 2.3 Jan 10, 2024
@lithomas1 lithomas1 modified the milestones: 2.3, 3.0 Jan 11, 2024
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OS X Related to Mac OS & hardware issues (M1) Sprints Sprint Pull Requests Stale

5 participants