Simple GMT code not running

Hello “The Powers that Be”,
I have got myself into gmt trouble and seek assistance.

  1. I have installed gmt 6.4 and pygmt 0.70 via Anaconda (full version, not miniconda) in a separate Environment on my Windows 10 OS.
  2. pygmt example codes are working smoothly as butter…yay!
  3. When I wrote the code snippet below to fire up regular gmt I get an error. However when I ran a single line gmt code on the terminal gmt worked. Code that worked followes. That is followed by code that did not work followed by Error given. Yes, I have included the path for gmt in my windows Environment.

Code that worked on the terminal

(PyGMT) C:\Users\Pragnyadipta\Documents\GSITI2022>gmt coast -RFR -JM6i -Gblue -B -pdf,png France1

Code that did not work when written as a with executive privilages

#! /usr/bin/bash

gmt begin GMT_tut_3

gmt set GMT_THEME cookbook

gmt coast -R-90/-70/0/20 -JM6i -B -Gchocolate

gmt end show


(PyGMT) C:\Users\Pragnyadipta\Documents\GSITI2022>bash
gmt.exe [ERROR]: Shared GMT module not found: coast

ERROR: No module named coast was found. This could mean one of four cases:

  1. There actually is no such module; please check your spelling.
  2. You used a modern mode module name while running in GMT classic mode.
  3. Module exists in the GMT supplemental library, but the library could not be found.
  4. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
    Shared libraries must be in standard system paths or set via environmental parameter %%PATH%%.

gmt.exe [ERROR]: Not available in classic mode

Any help would be much appreciated.

My sincere regards and thanks in advance.