I am on ubuntu and encountered the same problem. As said previously its a PMI problem. Follow these steps and it will be resolved.
sudo apt update && sudo apt upgrade
sudo apt-get install mpich
sudo apt install openmpi-bin openmpi-common libopenmpi-dev