SHTOOLS icon indicating copy to clipboard operation
SHTOOLS copied to clipboard

Unable to install when using Python `3.13`

Open HCookie opened this issue 1 year ago • 5 comments

Description of the problem

As of October 7th 2024, Python 3.13 was released. However, pyshtools cannot be installed when using this 3.13. I have checked my system and on 3.12 it installs just fine.

See below for the build stack trace

Stack Trace
  error: Failed to prepare distributions
    Caused by: Failed to fetch wheel: pyshtools==4.13.1
    Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
  --- stdout:
  + meson setup .../pyshtools/4.13.1/HF3xwocSlYTNmvMH3kVjy/pyshtools-4.13.1.tar.gz .../pyshtools/4.13.1/HF3xwocSlYTNmvMH3kVjy/pyshtools-4.13.1.tar.gz/.mesonpy-8q44trl8 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --default-library=static --native-file=.../pyshtools/4.13.1/HF3xwocSlYTNmvMH3kVjy/pyshtools-4.13.1.tar.gz/.mesonpy-8q44trl8/meson-python-native-file.ini
  The Meson build system
  Version: 1.6.0
  Source dir: .../pyshtools/4.13.1/HF3xwocSlYTNmvMH3kVjy/pyshtools-4.13.1.tar.gz
  Build dir: .../pyshtools/4.13.1/HF3xwocSlYTNmvMH3kVjy/pyshtools-4.13.1.tar.gz/.mesonpy-8q44trl8
  Build type: native build
  Program python3 found: YES (.../bin/python3)
  WARNING: You should add the boolean check kwarg to the run_command call.
           It currently defaults to false,
           but it will default to true in meson 2.0.
           See also: https://github.com/mesonbuild/meson/issues/9300
  WARNING: failed to process netrc file: ~/.netrc access too permissive: access permissions must restrict access to only the owner (None, line None).
  Project name: shtools
  Project version: 4.13.1
  Fortran compiler for the host machine: gfortran (gcc 8.5.0 "GNU Fortran (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)")
  Fortran linker for the host machine: gfortran ld.bfd 2.30-119
  C compiler for the host machine: gcc (gcc 8.5.0 "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)")
  C linker for the host machine: gcc ld.bfd 2.30-119
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Found pkg-config: YES (/usr/bin/pkg-config) 1.4.2
  Found CMake: /usr/bin/cmake (3.20.2)
  Run-time dependency openblas found: NO (tried pkgconfig and cmake)
  Run-time dependency openblas found: NO (tried pkgconfig and cmake)
  Run-time dependency blas found: NO (tried pkgconfig and cmake)
  
  ../meson.build:15:9: ERROR: Dependency "BLAS" not found, tried pkgconfig and cmake

System information

Fortran compiler for the host machine: gfortran (gcc 8.5.0 "GNU Fortran (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)") Fortran linker for the host machine: gfortran ld.bfd 2.30-119 C compiler for the host machine: gcc (gcc 8.5.0 "gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)") C linker for the host machine: gcc ld.bfd 2.30-119 Host machine cpu family: x86_64 Host machine cpu: x86_64

HCookie avatar Oct 28 '24 11:10 HCookie

Could you try installing from source? There are no wheels or conda packages yet for python 3.13.

MarkWieczorek avatar Oct 28 '24 11:10 MarkWieczorek

Could you try installing from source?

Yes, I am able to install from source. However, downstream users / CI actions of a depending package may find those steps tricky.

There are no wheels or conda packages yet for python 3.13.

I am hoping to use this issue to notify when wheels or conda packages are available for Python 3.13.

I do understand that 3.13 just came out, so it is not an immediate requirement. Was just raising awareness of the current issue.

HCookie avatar Oct 28 '24 12:10 HCookie

I wasn't aware about 3.13, so I'll look into it. It might be easy to just rerun our release action to make and upload the wheels, but conda will probably have to wait until the next release (before the end of the year).

MarkWieczorek avatar Oct 28 '24 12:10 MarkWieczorek

Thanks @MarkWieczorek, 3.13 kinda snuck up on me too. Hopefully a rerun will solve the pypi issue

HCookie avatar Oct 28 '24 12:10 HCookie

I just wanted to point out that, for Python 3.13 builds to get automatically created for PyPi, some small changes will need to be made to the build_wheels.yml GitHub workflow file.

Specifically, in the two places where pypa/[email protected] is mentioned, it will need to be replaced with pypa/[email protected].

We shouldn't need to do much more than that, though, as far as 3.13 support goes for the GH action.

cometbeetle avatar Feb 07 '25 16:02 cometbeetle