Issue (no output) when running mpi4py scripts in Jupyter Notebook

I am new to mpi and I have the following basic mpi4py scripts.

%%writefile mpi1.py
#####
# writting the code in the mpi1.py file
#####

from mpi4py import MPI

comm = MPI.COMM_WORLD
size = comm.Get_size()
rank = comm.Get_rank()
print('hello world: size = %d, rank = %d' % (size, rank))

Then, I use the following command to execute this script:

!mpiexec -n 4 python3 mpi1.py

It does run but there is not output (I expect it would print hello world…)

Any comments on this issue?

Issue (no output) when running mpi4py scripts in Jupyter Notebook