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

pip install problems #2

Open
alexander-mead opened this issue Nov 6, 2022 · 11 comments
Open

pip install problems #2

alexander-mead opened this issue Nov 6, 2022 · 11 comments

Comments

@alexander-mead
Copy link

If I try to pip install I get the following, what's going on?

Physics/pyhalomodel_stuff> pip3 install pyhmcode
Collecting pyhmcode
  Using cached pyhmcode-1.0.0.tar.gz (352 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/1a/40/16827df17adf0742d7b331115e169e8302c2641e799a037b68ec725a2732/pyhmcode-1.0.0.tar.gz (from https://pypi.org/simple/pyhmcode/): Requested pyhmcode from https://files.pythonhosted.org/packages/1a/40/16827df17adf0742d7b331115e169e8302c2641e799a037b68ec725a2732/pyhmcode-1.0.0.tar.gz has inconsistent version: expected '1.0.0', but metadata has '0.0.0'
ERROR: Could not find a version that satisfies the requirement pyhmcode (from versions: 0.9.3, 1.0.0)
ERROR: No matching distribution found for pyhmcode
@tilmantroester
Copy link
Owner

I've tried to reproduce this but while I found a different problem with the build, I couldn't reproduce your error.

@alexander-mead
Copy link
Author

alexander-mead commented Jan 10, 2023

I got a bit further by following this: https://stackoverflow.com/questions/67074684/pip-has-problems-with-metadata

python3 -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver pyhmcode

But then I get this error, which looks like it comes from f90wrap:

Physics/HMcode> pip install pyhmcode 
Collecting pyhmcode
  Using cached pyhmcode-1.0.0.tar.gz (352 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/1a/40/16827df17adf0742d7b331115e169e8302c2641e799a037b68ec725a2732/pyhmcode-1.0.0.tar.gz (from https://pypi.org/simple/pyhmcode/): Requested pyhmcode from https://files.pythonhosted.org/packages/1a/40/16827df17adf0742d7b331115e169e8302c2641e799a037b68ec725a2732/pyhmcode-1.0.0.tar.gz has inconsistent version: expected '1.0.0', but metadata has '0.0.0'
ERROR: Could not find a version that satisfies the requirement pyhmcode (from versions: 0.9.3, 1.0.0)
ERROR: No matching distribution found for pyhmcode
Physics/HMcode> python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver pyhmcode
-bash: python: command not found
Physics/HMcode> python3 -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver pyhmcode
Collecting pyhmcode
  Downloading pyhmcode-1.0.0.tar.gz (352 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 352.6/352.6 kB 3.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting f90wrap
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. (read timeout=15)")': /packages/a5/42/81887c5db17ff438fa26c94c519afa401f350fd48cb9506e83fde7172cf1/f90wrap-0.2.9-cp310-cp310-macosx_10_9_x86_64.whl
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. (read timeout=15)")': /packages/a5/42/81887c5db17ff438fa26c94c519afa401f350fd48cb9506e83fde7172cf1/f90wrap-0.2.9-cp310-cp310-macosx_10_9_x86_64.whl
  Downloading f90wrap-0.2.9-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 520.2 kB/s eta 0:00:00
Requirement already satisfied, skipping upgrade: numpy in /usr/local/lib/python3.10/site-packages (from pyhmcode) (1.23.2)
Building wheels for collected packages: pyhmcode
  Building wheel for pyhmcode (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyhmcode (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [96 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      AssertionError:
      running bdist_wheel
      running build
      running build_py
      mkdir include
      gfortran -c -o build/precision.o library/src/precision.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/constants.o library/src/constants.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/physics.o library/src/physics.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/sorting.o library/src/sorting.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/basic_operations.o library/src/basic_operations.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/special_functions.o library/src/special_functions.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/array_operations.o library/src/array_operations.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/file_info.o library/src/file_info.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/random_numbers.o library/src/random_numbers.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/table_integer.o library/src/table_integer.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/interpolate.o library/src/interpolate.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/ode_solvers.o library/src/ode_solvers.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/string_operations.o library/src/string_operations.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/calculus_table.o library/src/calculus_table.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/statistics.o library/src/statistics.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/calculus.o library/src/calculus.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/minimization.o library/src/minimization.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/root_finding.o library/src/root_finding.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/camb_stuff.o library/src/camb_stuff.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/multidark_stuff.o library/src/multidark_stuff.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/hod_functions.o library/src/hod_functions.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/cosmology_functions.o library/src/cosmology_functions.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      gfortran -c -o build/hmx.o library/src/hmx.f90 -Jinclude -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
      libtool -static -o lib/libhmx.a build/precision.o build/constants.o build/physics.o build/sorting.o build/basic_operations.o build/special_functions.o build/array_operations.o build/file_info.o build/random_numbers.o build/table_integer.o build/interpolate.o build/ode_solvers.o build/string_operations.o build/calculus_table.o build/statistics.o build/calculus.o build/minimization.o build/root_finding.o build/camb_stuff.o build/multidark_stuff.o build/hod_functions.o build/cosmology_functions.o build/hmx.o
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: build/precision.o has no symbols
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: build/constants.o has no symbols
      cd f90wrap_pyhmcode && f90wrap \
                  --only print_cosmology assign_cosmology init_cosmology init_external_linear_power_tables print_halomod assign_halomod init_halomod calculate_HMx_old init_windows add_smooth_component_to_windows \
                  --shorten-routine-names \
                  --skip-types interpolator1D interpolator2D interpolator3D \
                  --kind-map ../f90wrap_helpers/kind_map \
                  -m pyhmcode --package \
                  --init-file ../f90wrap_helpers/classes.py \
                  ../library/src/cosmology_functions.f90 ../library/src/hmx.f90
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      AssertionError:
      Traceback (most recent call last):
        File "/private/var/folders/fr/c2m_v4ss6kjcbgzbqfr_z5fw0000gn/T/pip-build-env-a27lac0p/overlay/bin/f90wrap", line 3, in <module>
          from f90wrap.scripts.main import main
      ModuleNotFoundError: No module named 'f90wrap'
      make: *** [f90wrap_pyhmcode/f90wrap_cosmology_functions.f90] Error 1
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/usr/local/lib/python3.10/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.10/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 "/usr/local/lib/python3.10/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/usr/local/lib/python3.10/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
          self.run_setup()
        File "/usr/local/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(code, locals())
        File "<string>", line 87, in <module>
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
          self.run_command(cmd)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/build.py", line 24, in run
          super().run()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "<string>", line 55, in run
        File "<string>", line 23, in compile_library
        File "/usr/local/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['make', 'f90wrap']' returned non-zero exit status 2.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyhmcode
Failed to build pyhmcode
ERROR: Could not build wheels for pyhmcode, which is required to install pyproject.toml-based projects

@alexander-mead
Copy link
Author

I got things to work by first installing f90wrap manually.

pip3 install f90wrap
python3 -m pip install --use-deprecated=legacy-resolver pyhmcode

but I note that the version information looks a bit strange

Collecting pyhmcode
  Using cached pyhmcode-1.0.0.tar.gz (352 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: f90wrap in /usr/local/lib/python3.10/site-packages (from pyhmcode) (0.2.9)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/site-packages (from pyhmcode) (1.23.2)
Building wheels for collected packages: pyhmcode
  Building wheel for pyhmcode (pyproject.toml) ... done
  Created wheel for pyhmcode: filename=pyhmcode-0.0.0-py3-none-any.whl size=663181 sha256=c923c85feca613109be152f7d82e879743fe3f8bdd802e9dad113bad69c343ef
  Stored in directory: /Users/Mead/Library/Caches/pip/wheels/5b/08/4f/d5ae7622ab4450a8a40088bb177f328d6c6efec0938d4b5ca4
Successfully built pyhmcode
Installing collected packages: pyhmcode
Successfully installed pyhmcode-0.0.0

given that it says that it has installed version 0.0.0 whereas the .tar.gz file is 1.0.0.

@nikfilippas
Copy link

@alexander-mead I glossed over this when troubleshooting my installation, maybe try to avoid using the cached version of pyhmcode using --no-cache-dir, so that it re-downloads the correct version.

@nikosarcevic
Copy link

nikosarcevic commented May 19, 2023

Hi,

im on Mac and I have the same issue that I cannot resolve by installing the f90wrap

error pasted below

note: This error originates from a subprocess, and is likely not a problem with pip.
niko @ MacBook-Pro-83.local : ~% pip install pyhmcode
Collecting pyhmcode
  Using cached pyhmcode-1.0.0.tar.gz (352 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      Collecting setuptools>=42
        Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
      Collecting wheel
        Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
      Collecting f90wrap>=0.2.6
        Using cached f90wrap-0.2.13.tar.gz (2.9 MB)
        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'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [25 lines of output]
            + meson setup /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46 /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46/.mesonpy-px7qe5_r/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46/.mesonpy-px7qe5_r/build/meson-python-native-file.ini
            The Meson build system
            Version: 1.1.0
            Source dir: /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46
            Build dir: /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46/.mesonpy-px7qe5_r/build
            Build type: native build
            Project name: f90wrap
            Project version: 0.2.13
            C compiler for the host machine: x86_64-apple-darwin13.4.0-clang (clang 11.1.0 "clang version 11.1.0")
            C linker for the host machine: x86_64-apple-darwin13.4.0-clang ld64 530
            Host machine cpu family: x86_64
            Host machine cpu: x86_64
      
            ../../meson.build:13:0: ERROR: Unable to detect GNU compiler type:
            Compiler stdout:
      
            -----
            Compiler stderr:
            x86_64-apple-darwin13.4.0-gfortran: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
            compilation terminated.
      
            -----
      
      
            A full log can be found at /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46/.mesonpy-px7qe5_r/build/meson-logs/meson-log.txt
            [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.
      [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.
niko @ MacBook-Pro-83.local : ~% pip3 install f90wrap
Collecting f90wrap
  Using cached f90wrap-0.2.13.tar.gz (2.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      + meson setup /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9 /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9/.mesonpy-y2dc04q4/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9/.mesonpy-y2dc04q4/build/meson-python-native-file.ini
      The Meson build system
      Version: 1.1.0
      Source dir: /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9
      Build dir: /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9/.mesonpy-y2dc04q4/build
      Build type: native build
      Project name: f90wrap
      Project version: 0.2.13
      C compiler for the host machine: x86_64-apple-darwin13.4.0-clang (clang 11.1.0 "clang version 11.1.0")
      C linker for the host machine: x86_64-apple-darwin13.4.0-clang ld64 530
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      
      ../../meson.build:13:0: ERROR: Unable to detect GNU compiler type:
      Compiler stdout:
      
      -----
      Compiler stderr:
      x86_64-apple-darwin13.4.0-gfortran: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
      compilation terminated.
      
      -----
      
      
      A full log can be found at /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-1fbmofsr/f90wrap_78cf6cefd64a4c809b1b40fa56f9eaa9/.mesonpy-y2dc04q4/build/meson-logs/meson-log.txt
      [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.

@eli-schwartz
Copy link

eli-schwartz commented May 21, 2023

../../meson.build:13:0: ERROR: Unable to detect GNU compiler type:
Compiler stdout:

-----
Compiler stderr:
x86_64-apple-darwin13.4.0-gfortran: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
compilation terminated.

-----


A full log can be found at /private/var/folders/0x/z32gfbyx2ls71tblrjjbdh0w0000gn/T/pip-install-y3fa5rpg/f90wrap_3e74b61978504395b68fd0b878766b46/.mesonpy-px7qe5_r/build/meson-logs/meson-log.txt

pip tried to build pip install f90wrap as a dependency, but f90wrap failed to build since it requires a Fortran compiler. You seem to have one installed -- x86_64-apple-darwin13.4.0-gfortran -- but it doesn't work.

@tilmantroester
Copy link
Owner

tilmantroester commented May 22, 2023

I'm on an M1 and I can't reproduce the error when using a conda environment with the conda compilers, so I can't help you much there. f90wrap now supports numpy 1.24, so the earlier issues of incompatible numpy versions shouldn't be a problem any more either.

@krittisharma
Copy link

Does pyhmcode has a requirements.txt file that can be used to install the relevant software? I've been trying to install pyhmcode using pip. I am using recent versions of setuptools and numpy. I get the following error. How can I resolve this?

I also tested installation of distutils manually. Is there a specific version that I should be using?

In [1]: import distutils
In [2]: from distutils import msvccompiler
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 from distutils import msvccompiler
ImportError: cannot import name 'msvccompiler' from 'distutils' (/Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/__init__.py)

`% python3 -m pip install --use-deprecated=legacy-resolver --no-cache-dir pyhmcode
Collecting pyhmcode
Downloading pyhmcode-1.1.0.tar.gz (977 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 978.0/978.0 kB 19.2 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 /Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages (from pyhmcode) (1.26.0)
Requirement already satisfied: f90wrap in /Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages (from pyhmcode) (0.2.16)
Requirement already satisfied: packaging in /Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages (from f90wrap->pyhmcode) (23.1)
Building wheels for collected packages: pyhmcode
Building wheel for pyhmcode (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pyhmcode (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [229 lines of output]
running bdist_wheel
running build
running build_py
mkdir include
gfortran -c -o build/precision.o library/src/precision.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/constants.o library/src/constants.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/physics.o library/src/physics.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/sorting.o library/src/sorting.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/basic_operations.o library/src/basic_operations.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/special_functions.o library/src/special_functions.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/array_operations.o library/src/array_operations.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/file_info.o library/src/file_info.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/random_numbers.o library/src/random_numbers.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/table_integer.o library/src/table_integer.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/interpolate.o library/src/interpolate.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/ode_solvers.o library/src/ode_solvers.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/string_operations.o library/src/string_operations.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/calculus_table.o library/src/calculus_table.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/statistics.o library/src/statistics.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/calculus.o library/src/calculus.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/minimization.o library/src/minimization.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/root_finding.o library/src/root_finding.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/camb_stuff.o library/src/camb_stuff.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/multidark_stuff.o library/src/multidark_stuff.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/hod_functions.o library/src/hod_functions.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/cosmology_functions.o library/src/cosmology_functions.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
gfortran -c -o build/hmx.o library/src/hmx.f90 -Jinclude -fPIC -cpp -fopenmp -O3 -ffree-line-length-none -std=gnu -fdefault-real-8 -fdefault-double-8
libtool -static -o lib/libhmx.a build/precision.o build/constants.o build/physics.o build/sorting.o build/basic_operations.o build/special_functions.o build/array_operations.o build/file_info.o build/random_numbers.o build/table_integer.o build/interpolate.o build/ode_solvers.o build/string_operations.o build/calculus_table.o build/statistics.o build/calculus.o build/minimization.o build/root_finding.o build/camb_stuff.o build/multidark_stuff.o build/hod_functions.o build/cosmology_functions.o build/hmx.o
cd f90wrap_pyhmcode && f90wrap
--only print_cosmology assign_cosmology init_cosmology init_external_linear_power_tables print_halomod assign_halomod init_halomod calculate_HMx_old init_windows add_smooth_component_to_windows
--shorten-routine-names
--skip-types interpolator1D interpolator2D interpolator3D
--kind-map ../f90wrap_helpers/kind_map
-m pyhmcode --package
--init-file ../f90wrap_helpers/classes.py
../library/src/cosmology_functions.f90 ../library/src/hmx.f90
Kind map (also saved to .f2py_f2cmap)
{'real': {'': 'double'}}

  Constructors:
  ('initialise_ptr', 'initialise', 'allocate')
  
  Destructors:
  ('finalise', 'deallocate')
  
  Short names for derived types:
  {}
  
  String lengths:
  {}
  
  Initialisation lines for derived types
  {}
  
  Python module name remapping
  {}
  Class names remapping
  {}
  
  Argument name map:
  {}
  
  Size of Fortran derived type pointers is 2 bytes.
  
  Parsing Fortran source files ['../library/src/cosmology_functions.f90', '../library/src/hmx.f90'] ...
  INFO:f90wrap.parser:marking module cosmology_functions as default private
  INFO:f90wrap.parser:parser reading type cosmology
  INFO:f90wrap.parser:marking module HMx as default private
  INFO:f90wrap.parser:parser reading type halomod
  done parsing source.
  
  Derived types detected in Fortran source files:
  {'class(cosmology)': Type(name=cosmology),
   'class(halomod)': Type(name=halomod),
   'cosmology': Type(name=cosmology),
   'halomod': Type(name=halomod),
   'type(cosmology)': Type(name=cosmology),
   'type(halomod)': Type(name=halomod)}
  
  Class name mapping:
  {'class(cosmology)': 'cosmology',
   'class(halomod)': 'halomod',
   'cosmology': 'cosmology',
   'halomod': 'halomod',
   'type(cosmology)': 'cosmology',
   'type(halomod)': 'halomod'}
  Modules for each type:
  {'cosmology_functions': 'cosmology_functions', 'hmx': 'hmx'}
  WARNING:f90wrap.transform:removing cosmology.grow as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.grate as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.agrow as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.dc as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.dv as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.dist as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.time as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.xde as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.rspt as type type(interpolator1d) unsupported
  WARNING:f90wrap.transform:removing cosmology.sigma as type type(interpolator2d) unsupported
  WARNING:f90wrap.transform:removing cosmology.plin as type type(interpolator2d) unsupported
  WARNING:f90wrap.transform:removing cosmology.wiggle as type type(interpolator2d) unsupported
  WARNING:f90wrap.transform:removing cosmology.tk_matter as type type(interpolator2d) unsupported
  WARNING:f90wrap.transform:removing cosmology.tk_cold as type type(interpolator2d) unsupported
  WARNING:f90wrap.transform:removing halomod.hod as type type(hodmod) unsupported
  WARNING:f90wrap.transform:removing halomod.bnl as type type(interpolator3d) unsupported
  WARNING:f90wrap.transform:removing halomod.bnl_lownu as type type(interpolator3d) unsupported
  WARNING:f90wrap.transform:removing halomod.bnl_lowk as type type(interpolator3d) unsupported
  WARNING:f90wrap.transform:removing halomod.bnl_lownu_lowk as type type(interpolator3d) unsupported
  INFO:f90wrap.transform:adding missing constructor for cosmology
  INFO:f90wrap.transform:adding missing constructor for halomod
  INFO:f90wrap.transform:adding missing destructor for cosmology
  INFO:f90wrap.transform:adding missing destructor for halomod
  INFO:f90wrap.transform:visiting Module(name=cosmology_functions) found 0 constructors with names: []
  INFO:f90wrap.transform:visiting Type(name=cosmology) found 1 constructors with names: ['cosmology_initialise']
  INFO:f90wrap.transform:visiting Module(name=hmx) found 0 constructors with names: []
  INFO:f90wrap.transform:visiting Type(name=halomod) found 1 constructors with names: ['halomod_initialise']
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting module cosmology_functions
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting type cosmology
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine cosmology_initialise
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine cosmology_finalise
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine assign_cosmology
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine init_cosmology
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine print_cosmology
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine init_external_linear_power_tables
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting module hmx
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting type halomod
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine halomod_initialise
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine halomod_finalise
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine assign_halomod
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine init_halomod
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine print_halomod
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine calculate_hmx_old
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine init_windows
  INFO:f90wrap.pywrapgen:PythonWrapperGenerator visiting routine add_smooth_component_to_windows
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting module cosmology_functions
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting type cosmology
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine cosmology_initialise call_name cosmology_initialise mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine cosmology_finalise call_name cosmology_finalise mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine assign_cosmology call_name assign_cosmology mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine init_cosmology call_name init_cosmology mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine print_cosmology call_name print_cosmology mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine init_external_linear_power_tables call_name init_external_linear_power_tables mod_name 'cosmology_functions'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting module hmx
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting type halomod
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine halomod_initialise call_name halomod_initialise mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine halomod_finalise call_name halomod_finalise mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine assign_halomod call_name assign_halomod mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine init_halomod call_name init_halomod mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine print_halomod call_name print_halomod mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine calculate_hmx_old call_name calculate_HMx_old mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine init_windows call_name init_windows mod_name 'hmx'
  INFO:f90wrap.f90wrapgen:F90WrapperGenerator visiting routine add_smooth_component_to_windows call_name add_smooth_component_to_windows mod_name 'hmx'
  cd f90wrap_pyhmcode && f2py-f90wrap \
              --build-dir . \
              -c -m _pyhmcode \
              --f90flags="-fdefault-real-8 -fdefault-double-8" \
              -L../lib -lhmx -I../include f90wrap_cosmology_functions.f90 f90wrap_hmx.f90
  
  !! f90wrap patched version of f2py - James Kermode <[email protected]> !!
  
  Traceback (most recent call last):
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/bin/f2py-f90wrap", line 8, in <module>
      sys.exit(main())
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/f90wrap/scripts/f2py_f90wrap.py", line 219, in main
      numpy.f2py.main()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 770, in main
      run_compile()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 594, in run_compile
      build_backend = f2py_build_generator(backend_key)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/f2py/_backends/__init__.py", line 6, in f2py_build_generator
      from ._distutils import DistutilsBackend
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/f2py/_backends/_distutils.py", line 3, in <module>
      from numpy.distutils.core import setup, Extension
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 24, in <module>
      from numpy.distutils.command import config, config_compiler, \
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/distutils/command/config.py", line 19, in <module>
      from numpy.distutils.mingw32ccompiler import generate_manifest
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/numpy/distutils/mingw32ccompiler.py", line 27, in <module>
      from distutils.msvccompiler import get_build_version as get_build_msvc_version
  ModuleNotFoundError: No module named 'distutils.msvccompiler'
  make: *** [f90wrap] Error 1
  Traceback (most recent call last):
    File "/Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/krittisharma/opt/anaconda3/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/krittisharma/opt/anaconda3/lib/python3.9/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 "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 438, in build_wheel
      return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 426, in _build
      return self._build_with_temp_dir(
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 87, in <module>
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 183, in setup
      return run_commands(dist)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
      dist.run_commands()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 381, in run
      self.run_command("build")
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/6j/lpyl6ggd4157vb72p92dzvbw0000gn/T/pip-build-env-i4s7lod_/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "<string>", line 55, in run
    File "<string>", line 23, in compile_library
    File "/Users/krittisharma/opt/anaconda3/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['make', 'f90wrap']' returned non-zero exit status 2.
  [end of output]

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

@tilmantroester
Copy link
Owner

It should work with just with what's in the pyproject.toml. Or at least it used to.
I'm not sure why it's looking for msvccompiler. Are you on windows? If so that might introduce even more ways this already brittle setup can break.

@krittisharma
Copy link

I'm on mac OS with arm64 architecture. My python version is 3.9.18, numpy version is 1.26.0, setuptools version is 75.6.0.

@krittisharma
Copy link

Can someone please share the version of numpy, setuptools, python, f90wrap that successfully compiles for them? Thanks

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

6 participants