Running minial example: gmsh returned non-zero exit status 1

Hi all,
I am running Windows 10 with Python 3.11. I have installed bmepp and gmsh using pip.
When running

import bempp.api
import numpy as np
grid = bempp.api.shapes.sphere(h=0.1)

I get the Error

Command ‘C:\programs\python311\Scripts\gmsh -2 C:\Users[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo’ returned non-zero exit status 1.

When I run the command in a console I get exit code 0 with the output

Info    : Running 'C:\programs\python311\Scripts\gmsh.bat\..\gmsh -2 C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo' [Gmsh 4.11.1, 1 node, max. 1 thread]
Info    : Started on Tue Jun 13 16:04:34 2023
Info    : Reading 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo'...
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 28: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 30: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 32: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 34: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 36: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 38: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 40: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo', line 42: 'Ruled Surface' command is deprecated: use 'Surface' instead
Info    : Done reading 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.geo'
Info    : Meshing 1D...
Info    : [  0%] Meshing curve 1 (Ellipse)
Info    : [ 10%] Meshing curve 2 (Ellipse)
Info    : [ 20%] Meshing curve 3 (Ellipse)
Info    : [ 30%] Meshing curve 4 (Ellipse)
Info    : [ 40%] Meshing curve 5 (Ellipse)
Info    : [ 50%] Meshing curve 6 (Ellipse)
Info    : [ 50%] Meshing curve 7 (Ellipse)
Info    : [ 60%] Meshing curve 8 (Ellipse)
Info    : [ 70%] Meshing curve 9 (Ellipse)
Info    : [ 80%] Meshing curve 10 (Ellipse)
Info    : [ 90%] Meshing curve 11 (Ellipse)
Info    : [100%] Meshing curve 12 (Ellipse)
Info    : Done meshing 1D (Wall 0.0226901s, CPU 0.015625s)
Info    : Meshing 2D...
Info    : [  0%] Meshing surface 14 (Surface, Frontal-Delaunay)
Info    : [ 20%] Meshing surface 16 (Surface, Frontal-Delaunay)
Info    : [ 30%] Meshing surface 18 (Surface, Frontal-Delaunay)
Info    : [ 40%] Meshing surface 20 (Surface, Frontal-Delaunay)
Info    : [ 50%] Meshing surface 22 (Surface, Frontal-Delaunay)
Info    : [ 70%] Meshing surface 24 (Surface, Frontal-Delaunay)
Info    : [ 80%] Meshing surface 26 (Surface, Frontal-Delaunay)
Info    : [ 90%] Meshing surface 28 (Surface, Frontal-Delaunay)
Info    : Done meshing 2D (Wall 0.229045s, CPU 0.234375s)
Info    : 1611 nodes 3415 elements
Info    : Writing 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.msh'...
Info    : Done writing 'C:\Users\[MYNAME]\AppData\Local\Temp\tmp_rizfbcm\tmp9kwbslik.msh'
Info    : Stopped on Tue Jun 13 16:04:34 2023 (From start: Wall 0.340262s, CPU 0.375s)

While not advisable I am now able to use the software using the monkey patch

import subprocess

def cc(*arg, **kwarg):
    print("monkey patched ;)", flush = True)
    subprocess.run(*arg, **kwarg)
    
subprocess.check_call = cc

I too find difficulty in executing the command
grid = bempp.api.shapes.sphere(h=0.1)

The error displays : The following command failed: /home/amit/.local/bin/gmsh -2 /tmp/tmpfxqhzy42/tmpssh_p7yl.geo; subprocess.CalledProcessError: Command ‘/home/amit/.local/bin/gmsh -2 /tmp/tmpfxqhzy42/tmpssh_p7yl.geo’ returned non-zero exit status 127.

I naively tried the monkey patch without any success with following error : meshio._exceptions.ReadError: File /tmp/tmp5be86evw/tmpo7k2n5ts.msh not found. I’m using python3.10 and got same error using IDLE shell 3.10.6. Please help to resolve the issue.