Geodels / gospl

Global Scalable Paleo Landscape Evolution Model
https://gospl.readthedocs.io
GNU General Public License v3.0
56 stars 11 forks source link

Windows 10 pip install petsc4py install fails #269

Closed RichardScottOZ closed 2 weeks ago

RichardScottOZ commented 2 weeks ago

Describe the bug petsc4py installation fails

To Reproduce

pip install petsc4py

Expected behavior package installs

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

>pip install petsc4py
Collecting petsc4py
  Downloading petsc4py-3.21.2.tar.gz (420 kB)
     ---------------------------------------- 420.2/420.2 kB 1.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [85 lines of output]
      Collecting petsc<3.22,>=3.21
        Downloading petsc-3.21.2.tar.gz (17.3 MB)
           ---------------------------------------- 17.3/17.3 MB 4.0 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 wheel
        Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
      Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
      Building wheels for collected packages: petsc
        Building wheel for petsc (pyproject.toml): started
        Building wheel for petsc (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        Building wheel for petsc (pyproject.toml) did not run successfully.
        exit code: 1

        [58 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build\lib
        creating build\lib\petsc
        copying config\pypi\__init__.py -> build\lib\petsc
        copying config\pypi\__main__.py -> build\lib\petsc
        installing to build\bdist.win-amd64\wheel
        running install
        PETSc: configure
        configure options:
            --prefix=C:\Users\rscott\AppData\Local\Temp\pip-install-dm5mv7gc\petsc_0c2c11fd351d45a899e55d6d6eaccad5\build\bdist.win-amd64\wheel\petsc
            PETSC_ARCH=arch-python
            --with-shared-libraries=1
            --with-debugging=0
            --with-c2html=0
            --with-mpi=0
        ===============================================================================
         *** Windows python detected. Please rerun ./configure with cygwin-python. ***
        ===============================================================================
        Traceback (most recent call last):
          File "C:\Users\rscott\AppData\Local\miniconda3\envs\gospl-package\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
            main()
          File "C:\Users\rscott\AppData\Local\miniconda3\envs\gospl-package\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\rscott\AppData\Local\miniconda3\envs\gospl-package\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,
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
            return self._build_with_temp_dir(
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
            self.run_setup()
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
            exec(code, locals())
          File "<string>", line 363, in <module>
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
            return distutils.core.setup(**attrs)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
            return run_commands(dist)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
            dist.run_commands()
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
            self.run_command(cmd)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
            super().run_command(command)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
            cmd_obj.run()
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 403, in run
            self.run_command("install")
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
            self.distribution.run_command(command)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
            super().run_command(command)
          File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
            cmd_obj.run()
          File "<string>", line 286, in run
          File "<string>", line 189, in config
        RuntimeError: 3
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for petsc
      Failed to build petsc
      ERROR: Could not build wheels for petsc, which is required to install pyproject.toml-based projects
      [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 backend 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.
RichardScottOZ commented 2 weeks ago

This suggests this OS is not much chance natively given the cygwin comment?

Which I haven't needed to try and use for some time, not that it would not be possible.

tristan-salles commented 2 weeks ago

Yes WSL would be the way forward.