I get an error when running this program with pygmt. It prompts that the gmt_1.ps file cannot be found, the problem is that I don't have the folder gmt_session.19036

It sounds like you’re encountering an issue with a Python program that uses PyGMT, a Python interface for the Generic Mapping Tools (GMT). From what you’ve described, it seems like the program is trying to access a file named gmt_1.ps in a folder called gmt_session.19036, but it’s unable to find that folder.

Hello @jiaxiangtian

Welcome to the GMT forum!

Please take a look at the guidelines for creating a good forum post at Forum tips & tricks: create a good post. Especially, do not post screenshots of code and error / warning messages. Just copy and paste both. You can format your script as code by placing three backticks in the line before and after the block with the script:

your script formatted as code

Can you please post the complete output of python -c "import pygmt; pygmt.show_versions()".