Can not create annimation

Hi all,
I tried the animation in the example gallery https://docs.generic-mapping-tools.org/dev/animations/anim01.html#anim01. But I failed with errors as: psconvert [ERROR]: Could not create …/anim01_18.png. Maybe input file does not fulfill PS specifications.
end [ERROR]: Cannot determine current directory!
end [WARNING]: Unable to remove directory /Users/wei/.gmt/sessions/gmt_session.14959 [permissions?]
gmt [WARNING]: Unable to determine current working directory.
psconvert [ERROR]: Could not create …/anim01_17.png. Maybe input file does not fulfill PS specifications.
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
end [ERROR]: Cannot determine current directory!
end [WARNING]: Unable to remove directory /Users/wei/.gmt/sessions/gmt_session.14950 [permissions?]
gmt [WARNING]: Unable to determine current working directory.
wei@192 annimation % cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

I work on Mac system.
What is the problem?

Not sure. If you just run anim01.sh with no args it should just make a single PS frame. Perhaps you can run

bash -xv anim01.sh

and post the full output here?

Hi Paul,
Thank you for your reply. I checked my computer and found that I did not have the installation of graphicsmagick and FFmpeg on my system. When I installed them, I can make the animation.