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

BUG: Unable to setup RocketPy using python 3.11 #265

Closed
Gui-FernandesBR opened this issue Nov 2, 2022 · 8 comments · Fixed by #348
Closed

BUG: Unable to setup RocketPy using python 3.11 #265

Gui-FernandesBR opened this issue Nov 2, 2022 · 8 comments · Fixed by #348
Labels
Bug Something isn't working

Comments

@Gui-FernandesBR
Copy link
Member

Describe the bug

When used the most recent python 3.11 version, rocketpy cannot be properly installed, it seems that the interpreter is currently having issues when installing the netCDF4 library. More specifically, a error: metadata-generation-failed is raised.

To Reproduce

Initialize a fresh environment of python and ensure you are using python 3.11.0 version.

Expected behavior

I want to see something like this on my terminal after setting up rocketpy package:
Successfully installed certifi-2022.9.24 cffi-1.15.1 cftime-1.6.2 charset-normalizer-2.1.1 contourpy-1.0.6 cycler-0.11.0 fonttools-4.38.0 h3-3.7.4 idna-3.4 jsonpickle-2.2.0 kiwisolver-1.4.4 matplotlib-3.6.1 netCDF4-1.6.1 numpy-1.23.4 packaging-21.3 pillow-9.3.0 pycparser-2.21 pyparsing-3.0.9 python-dateutil-2.8.2 pytz-2022.6 requests-2.28.1 rocketpy-0.12.0 scipy-1.9.3 setuptools-65.5.0 simplekml-1.3.6 six-1.16.0 timezonefinder-6.1.6 urllib3-1.26.12 windrose-1.8.0

Screenshots

Trying to install rocketpy with python 3.11:
image
image

Now, when trying on python 3.10:
image
image
image

@Gui-FernandesBR
Copy link
Member Author

Does anyone have any idea on how to solve it?

@giovaniceotto @MateusStano @phmbressan @MrGribel

@Gui-FernandesBR Gui-FernandesBR added the Bug Something isn't working label Nov 2, 2022
@phmbressan
Copy link
Collaborator

phmbressan commented Nov 2, 2022

I was able to reproduce the issue. It seems to me that both netCDF4 and its dependency h5py lack wheels for python3.11.0.

I don't have yet a temporary fix for the problem, it is likely that in the upcoming weeks they will launch the wheels for python3.11.0. I will link here related issues from these packages:

h5py PR 3.11 wheel

I believe that it is possible to circumvent this problem by building both packages from source, but I had some difficulties with package dependencies.

@giovaniceotto
Copy link
Member

giovaniceotto commented Nov 3, 2022

Besides building both packages from source, which can be quite a challenge, especially on Windows, another solution that I have found is by relying on @conda-forge.

Conda-forge has already started the effort to support Python 3.11, and the status of the migration can be followed through this dedicated page: https://conda-forge.org/status/#python311

Both h5py and netCDF4 have already been migrated, which means that they can be installed in a conda environment with python 3.11.

Here is a recipe of how to do it:

  1. Install Anaconda or Mini-Conda
  2. Start the Anaconda Prompt and create a new environment to mess with: conda create -n py311.
  3. Activate the environment: conda activate py311.
  4. Install Python 3.11: conda install -c conda-forge python .
  5. Install h5py and netCDF4: conda install -c conda-forge h5py netCDF4
  6. Install RocketPy using pip: pip install rocketpy

The result is as follows:
image

Should work on any OS.

@Gui-FernandesBR Gui-FernandesBR removed their assignment Nov 5, 2022
@phmbressan
Copy link
Collaborator

phmbressan commented Feb 19, 2023

Update: it seems now that h5py have released python3.11.0 wheels in its newest version.

I was able to pip install rocketpy on python3.11.0, however newer versions still give an error.

@giovaniceotto giovaniceotto linked a pull request Apr 10, 2023 that will close this issue
4 tasks
@Gui-FernandesBR
Copy link
Member Author

Yeah finally!!

@Lucas-KB
Copy link
Contributor

Today I tried to install rocketpy and I realized it still fails running pip install rocketpy. I believe it is related to this issue.

I have tested it on Fedora, Debian and Alpine linux distributions using Python 3.11 and none of them worked. The installation attempt logs are reproduced below:

Fedora 38 Workstation:

  • Python version: 3.11.3
  • Pip version: 22.3.1
Defaulting to user installation because normal site-packages is not writeable
Collecting rocketpy
  Using cached rocketpy-0.13.1-py3-none-any.whl (129 kB)
Requirement already satisfied: numpy>=1.0 in /usr/lib64/python3.11/site-packages (from rocketpy) (1.24.3)
Requirement already satisfied: scipy>=1.0 in ./.local/lib/python3.11/site-packages (from rocketpy) (1.10.1)
Requirement already satisfied: matplotlib>=3.0 in ./.local/lib/python3.11/site-packages (from rocketpy) (3.7.1)
Collecting netCDF4<1.6,>=1.4
  Using cached netCDF4-1.5.8.tar.gz (767 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      Package hdf5 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `hdf5.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'hdf5', required by 'virtual:world', not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-huy4afe8/netcdf4_c601c881fceb4d62ab378fc02e0dce34/setup.py", line 435, in <module>
          raise ValueError('did not find netCDF version 4 headers')
      ValueError: did not find netCDF version 4 headers
      reading from setup.cfg...
      
          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /home/lucas/include ...
      hdf5 headers not found in /home/lucas/include
      checking /usr/local/include ...
      hdf5 headers not found in /usr/local/include
      checking /sw/include ...
      hdf5 headers not found in /sw/include
      checking /opt/include ...
      hdf5 headers not found in /opt/include
      checking /opt/local/include ...
      hdf5 headers not found in /opt/local/include
      checking /usr/include ...
      HDF5 library version: 1.12.1 headers found in /usr/include
      HDF5 library version: 1.12.1 found in /usr
      
      NETCDF4_DIR environment variable not set, checking standard locations..
      checking /home/lucas ...
      checking /usr/local ...
      checking /sw ...
      checking /opt ...
      checking /opt/local ...
      checking /usr ...
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Debian Bulseye:

  • Podman container started with the command: podman run --rm -it python:3.11-bullseye bash -l
  • Python version: 3.11.3
  • Pip version: 22.3.1
Collecting rocketpy
  Downloading rocketpy-0.13.1-py3-none-any.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.5/129.5 kB 5.2 MB/s eta 0:00:00
Collecting numpy>=1.0
  Downloading numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 22.1 MB/s eta 0:00:00
Collecting scipy>=1.0
  Downloading scipy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.1/34.1 MB 33.7 MB/s eta 0:00:00
Collecting matplotlib>=3.0
  Downloading matplotlib-3.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 25.7 MB/s eta 0:00:00
Collecting netCDF4<1.6,>=1.4
  Downloading netCDF4-1.5.8.tar.gz (767 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 767.0/767.0 kB 41.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Package hdf5 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `hdf5.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'hdf5' found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-0ywyb6i3/netcdf4_1684cd744ca9460d9132c0c0719539e7/setup.py", line 419, in <module>
          _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs)
        File "/tmp/pip-install-0ywyb6i3/netcdf4_1684cd744ca9460d9132c0c0719539e7/setup.py", line 360, in _populate_hdf5_info
          raise ValueError('did not find HDF5 headers')
      ValueError: did not find HDF5 headers
      reading from setup.cfg...
      
          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /root/include ...
      hdf5 headers not found in /root/include
      checking /usr/local/include ...
      hdf5 headers not found in /usr/local/include
      checking /sw/include ...
      hdf5 headers not found in /sw/include
      checking /opt/include ...
      hdf5 headers not found in /opt/include
      checking /opt/local/include ...
      hdf5 headers not found in /opt/local/include
      checking /usr/include ...
      hdf5 headers not found in /usr/include
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

Alpine 3.18:

  • Podman container started with the command: podman run --rm -it python:3.11-alpine sh -l
  • Python version: 3.11.3
  • Pip version: 22.3.1
Collecting rocketpy
  Downloading rocketpy-0.13.1-py3-none-any.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.5/129.5 kB 2.6 MB/s eta 0:00:00
Collecting numpy>=1.0
  Downloading numpy-1.24.3.tar.gz (10.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.9/10.9 MB 3.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting scipy>=1.0
  Downloading scipy-1.10.1.tar.gz (42.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.4/42.4 MB 2.7 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [332 lines of output]
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environment
      Ignoring numpy: markers 'platform_machine == "loongarch64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64" and platform_machine != "loongarch64" and platform_python_implementation != "PyPy"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.9" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "loongarch64" and platform_python_implementation != "PyPy"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.10" and (platform_system != "Windows" and platform_machine != "loongarch64") and platform_python_implementation != "PyPy"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.12"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.8" and platform_python_implementation == "PyPy"' don't match your environment
      Collecting meson-python<0.13.0,>=0.11.0
        Downloading meson_python-0.12.1-py3-none-any.whl (66 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.2/66.2 kB 2.0 MB/s eta 0:00:00
      Collecting Cython<3.0,>=0.29.32
        Using cached Cython-0.29.34-cp311-cp311-musllinux_1_1_x86_64.whl (2.0 MB)
      Collecting pybind11==2.10.1
        Downloading pybind11-2.10.1-py3-none-any.whl (216 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 216.1/216.1 kB 7.5 MB/s eta 0:00:00
      Collecting pythran<0.13.0,>=0.12.0
        Downloading pythran-0.12.2-py3-none-any.whl (4.2 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 21.2 MB/s eta 0:00:00
      Collecting wheel<0.39.0
        Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting numpy==1.23.2
        Downloading numpy-1.23.2.tar.gz (10.7 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 25.9 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting meson>=0.63.3
        Downloading meson-1.1.0-py3-none-any.whl (916 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 916.8/916.8 kB 33.1 MB/s eta 0:00:00
      Collecting pyproject-metadata>=0.6.1
        Downloading pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
      Collecting ply>=3.4
        Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.6/49.6 kB 9.4 MB/s eta 0:00:00
      Collecting gast<=0.5.3
        Downloading gast-0.5.3-py3-none-any.whl (19 kB)
      Collecting beniget~=0.4.0
        Downloading beniget-0.4.1-py3-none-any.whl (9.4 kB)
      Collecting packaging>=19.0
        Downloading packaging-23.1-py3-none-any.whl (48 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 8.5 MB/s eta 0:00:00
      Building wheels for collected packages: numpy
        Building wheel for numpy (pyproject.toml): started
        Building wheel for numpy (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for numpy (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [268 lines of output]
            setup.py:71: RuntimeWarning: NumPy 1.23.2 may not yet support Python 3.11.
              warnings.warn(
            Running from numpy source directory.
            setup.py:86: DeprecationWarning:
      
              `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
              of the deprecation of `distutils` itself. It will be removed for
              Python >= 3.12. For older Python versions it will remain present.
              It is recommended to use `setuptools < 60.0` for those Python versions.
              For more details, see:
                https://numpy.org/devdocs/reference/distutils_status_migration.html
      
      
              import numpy.distutils.command.sdist
            Processing numpy/random/_bounded_integers.pxd.in
            Processing numpy/random/_bounded_integers.pyx.in
            Processing numpy/random/_common.pyx
            Processing numpy/random/_generator.pyx
            Processing numpy/random/_mt19937.pyx
            Processing numpy/random/_pcg64.pyx
            Processing numpy/random/_philox.pyx
            Processing numpy/random/_sfc64.pyx
            Processing numpy/random/bit_generator.pyx
            Processing numpy/random/mtrand.pyx
            Cythonizing sources
            INFO: blas_opt_info:
            INFO: blas_armpl_info:
            INFO: customize UnixCCompiler
            INFO:   libraries armpl_lp64_mp not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: blas_mkl_info:
            INFO:   libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: blis_info:
            INFO:   libraries blis not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: openblas_info:
            INFO:   libraries openblas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: accelerate_info:
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_3_10_blas_threads_info:
            INFO: Setting PTATLAS=ATLAS
            INFO:   libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_3_10_blas_info:
            INFO:   libraries satlas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_blas_threads_info:
            INFO: Setting PTATLAS=ATLAS
            INFO:   libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_blas_info:
            INFO:   libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            /tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/system_info.py:2077: UserWarning:
                Optimized (vendor) Blas libraries are not found.
                Falls back to netlib Blas library which has worse performance.
                A better performance should be easily gained by switching
                Blas library.
              if self._calc_info(blas):
            INFO: blas_info:
            INFO:   libraries blas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            /tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/system_info.py:2077: UserWarning:
                Blas (http://www.netlib.org/blas/) libraries not found.
                Directories to search for the libraries can be specified in the
                numpy/distutils/site.cfg file (section [blas]) or by setting
                the BLAS environment variable.
              if self._calc_info(blas):
            INFO: blas_src_info:
            INFO:   NOT AVAILABLE
            INFO:
            /tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/system_info.py:2077: UserWarning:
                Blas (http://www.netlib.org/blas/) sources not found.
                Directories to search for the sources can be specified in the
                numpy/distutils/site.cfg file (section [blas_src]) or by setting
                the BLAS_SRC environment variable.
              if self._calc_info(blas):
            INFO:   NOT AVAILABLE
            INFO:
            non-existing path in 'numpy/distutils': 'site.cfg'
            INFO: lapack_opt_info:
            INFO: lapack_armpl_info:
            INFO:   libraries armpl_lp64_mp not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: lapack_mkl_info:
            INFO:   libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: openblas_lapack_info:
            INFO:   libraries openblas not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: openblas_clapack_info:
            INFO:   libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: flame_info:
            INFO:   libraries flame not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_3_10_threads_info:
            INFO: Setting PTATLAS=ATLAS
            INFO:   libraries tatlas,tatlas not found in /usr/local/lib
            INFO:   libraries tatlas,tatlas not found in /usr/lib
            INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_3_10_info:
            INFO:   libraries satlas,satlas not found in /usr/local/lib
            INFO:   libraries satlas,satlas not found in /usr/lib
            INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_threads_info:
            INFO: Setting PTATLAS=ATLAS
            INFO:   libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
            INFO:   libraries ptf77blas,ptcblas,atlas not found in /usr/lib
            INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>
            INFO:   NOT AVAILABLE
            INFO:
            INFO: atlas_info:
            INFO:   libraries f77blas,cblas,atlas not found in /usr/local/lib
            INFO:   libraries f77blas,cblas,atlas not found in /usr/lib
            INFO: <class 'numpy.distutils.system_info.atlas_info'>
            INFO:   NOT AVAILABLE
            INFO:
            INFO: lapack_info:
            INFO:   libraries lapack not found in ['/usr/local/lib', '/usr/lib']
            INFO:   NOT AVAILABLE
            INFO:
            /tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/system_info.py:1902: UserWarning:
                Lapack (http://www.netlib.org/lapack/) libraries not found.
                Directories to search for the libraries can be specified in the
                numpy/distutils/site.cfg file (section [lapack]) or by setting
                the LAPACK environment variable.
              return getattr(self, '_calc_info_{}'.format(name))()
            INFO: lapack_src_info:
            INFO:   NOT AVAILABLE
            INFO:
            /tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/system_info.py:1902: UserWarning:
                Lapack (http://www.netlib.org/lapack/) sources not found.
                Directories to search for the sources can be specified in the
                numpy/distutils/site.cfg file (section [lapack_src]) or by setting
                the LAPACK_SRC environment variable.
              return getattr(self, '_calc_info_{}'.format(name))()
            INFO:   NOT AVAILABLE
            INFO:
            INFO: numpy_linalg_lapack_lite:
            INFO:   FOUND:
            INFO:     language = c
            INFO:     define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
            INFO:
            Warning: attempted relative import with no known parent package
            /tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
              warnings.warn(msg)
            running bdist_wheel
            running build
            running config_cc
            INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
            running config_fc
            INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
            running build_src
            INFO: build_src
            INFO: building py_modules sources
            creating build
            creating build/src.linux-x86_64-3.11
            creating build/src.linux-x86_64-3.11/numpy
            creating build/src.linux-x86_64-3.11/numpy/distutils
            INFO: building library "npymath" sources
            WARN: Could not locate executable armflang
            WARN: Could not locate executable gfortran
            WARN: Could not locate executable f95
            WARN: Could not locate executable ifort
            WARN: Could not locate executable ifc
            WARN: Could not locate executable lf95
            WARN: Could not locate executable pgfortran
            WARN: Could not locate executable nvfortran
            WARN: Could not locate executable f90
            WARN: Could not locate executable f77
            WARN: Could not locate executable fort
            WARN: Could not locate executable efort
            WARN: Could not locate executable efc
            WARN: Could not locate executable g77
            WARN: Could not locate executable g95
            WARN: Could not locate executable pathf95
            WARN: Could not locate executable nagfor
            WARN: Could not locate executable frt
            WARN: don't know how to compile Fortran code on platform 'posix'
      
      
            [Errno 2] No such file or directory: 'gcc'
      
      
            Traceback (most recent call last):
              File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
                main()
              File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
                json_out['return_val'] = hook(**hook_input['kwargs'])
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
                return _build_backend().build_wheel(wheel_directory, config_settings,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 230, in build_wheel
                return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
                self.run_setup()
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 268, in run_setup
                self).run_setup(setup_script=setup_script)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 158, in run_setup
                exec(compile(code, __file__, 'exec'), locals())
              File "setup.py", line 493, in <module>
                setup_package()
              File "setup.py", line 485, in setup_package
                setup(**metadata)
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/core.py", line 169, in setup
                return old_setup(**new_attr)
                       ^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
                return distutils.core.setup(**attrs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
                dist.run_commands()
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
                self.run_command(cmd)
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
                cmd_obj.run()
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in run
                self.run_command('build')
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
                self.distribution.run_command(command)
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
                cmd_obj.run()
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/command/build.py", line 62, in run
                old_build.run(self)
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
                self.run_command(cmd_name)
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
                self.distribution.run_command(command)
              File "/tmp/pip-build-env-hll2dhnw/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
                cmd_obj.run()
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/command/build_src.py", line 144, in run
                self.build_sources()
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/command/build_src.py", line 155, in build_sources
                self.build_library_sources(*libname_info)
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/command/build_src.py", line 288, in build_library_sources
                sources = self.generate_sources(sources, (lib_name, build_info))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/distutils/command/build_src.py", line 378, in generate_sources
                source = func(extension, build_dir)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-install-316lc9j1/numpy_de23e0ffcbc843afa2f7c11f43d86eac/numpy/core/setup.py", line 758, in get_mathlib_info
                raise RuntimeError(
            RuntimeError: Broken toolchain: cannot link a simple C program.
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
      Failed to build numpy
      ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
      
      [notice] A new release of pip available: 22.3.1 -> 23.1.2
      [notice] To update, run: pip install --upgrade pip
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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.

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

@Gui-FernandesBR
Copy link
Member Author

Many thanks @Lucas-KB for pointing that out.
It seems that netcdf4 cannot be built in your environment based on the requirements given in the setup.py file.

Could you please try to build rocketpy again using the netcdf4==1.6.4 version? This should fix the problem.
That's a new version that was released a few days ago.

@Gui-FernandesBR
Copy link
Member Author

RocketPy has been running flawlessly on Python 3.11 for the past few months.
Closing this issue for now.

Let's see what happens with the recent Python 3.12 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants