[petsc-users] PETSc for python
Лев Усов
usovlev2000 at gmail.com
Wed Jun 5 09:19:08 CDT 2024
Hello, dear colleagues!
I'm trying to download the PETSc library for python. I use the pip command:
"pip install mpi4py petsc petsc4py" for python3 on Windows11, but I get an
installation error (see attached file).
Could you help me with this?
Best regards,
Lev.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240605/7d436a17/attachment-0001.html>
-------------- next part --------------
C:\Users\usovl>pip install mpi4py petsc petsc4py
Collecting mpi4py
Downloading mpi4py-3.1.6-cp312-cp312-win_amd64.whl.metadata (8.0 kB)
Collecting petsc
Downloading petsc-3.21.2.tar.gz (17.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 12.1 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting petsc4py
Downloading petsc4py-3.21.2.tar.gz (420 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 420.2/420.2 kB 13.2 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
╰─> [89 lines of output]
Collecting petsc<3.22,>=3.21
Using cached petsc-3.21.2.tar.gz (17.3 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'
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
[63 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\usovl\AppData\Local\Temp\pip-install-4vqqob1d\petsc_5264a13e7662435482a9bd86113b70f5\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:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Python312\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:\Python312\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\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\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\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
super().run_command(command)
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 403, in run
self.run_command("install")
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
super().run_command(command)
File "C:\Users\usovl\AppData\Local\Temp\pip-build-env-lgrqszpi\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.
More information about the petsc-users
mailing list