# Installed GMT.jl package and GMT v6.1.1 for Windows 64 bit. How can I start working with GMT package?

**URL:** https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356
**Category:** New to Julia
**Tags:** package, geo, gmt
**Created:** [May 18, 2021, 12:49pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356 "2021-05-18T12:49:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![shubh\_b](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shubh_b/32/20697_2.png) [@shubh\_b](https://discourse.julialang.org/u/shubh_b)
#### Post date: [May 18, 2021, 12:49pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/1 "2021-05-18T12:49:44Z")

</div>

I installed `GMT.jl` package and installed GMT for 64 bit Windows. Added GMT to PATH also. From Windows command prompt I can run `gmt`, it is showing list of options:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/6/165e98bdc5009f2ff84ee43ef2b48b321d1665b1.png)

But in Julia, it cannot detect gmt, showing message:

```julia
julia> using GMT

You don't seem to have GMT installed and I don't install it automatically.
You will have to do it yourself.
Download and install the official version at (the '..._win64.exe':
                 https://github.com/GenericMappingTools/gmt/releases

```

Can anyone please figure out? Is there anything else I need to do to start using `GMT.jl` module?

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 18, 2021, 5:10pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/2 "2021-05-18T17:10:16Z")

</div>

Ok, my guess is that you made previous attempts to `using GMT` while the GMT itself was not in the path (the NSIS installer software has a dumb bug and is not able to update paths that are longer than 1024 characters or so. Nothing I can do about it) and now it _remembers_ that. Try this

```julia
run(`touch $(pathof(GMT))`)

```

and then start a new Julia session.

FYI, the master version of GMT.jl now tries to automatically install GMT via Conda (on unix) or that same installer on Windows.

---

<div class="post-metadata">

### Author: ![shubh\_b](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shubh_b/32/20697_2.png) [@shubh\_b](https://discourse.julialang.org/u/shubh_b)
#### Post date: [May 19, 2021, 3:15am UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/3 "2021-05-19T03:15:43Z")

</div>

@joa-quim Thank you for your response and for this information.  
But for me, this line of code did not work. 🙂

Yes indeed, initially when I installed `GMT.jl` package and tried `using GMT`, GMT was not installed and set to the PATH in computer, later I did that. I don’t know where/when exactly I did any wrong!

I removed `GMT.jl` package from Julia and reinstalled. Still Julia cannot detect GMT in computer, showing same message.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 19, 2021, 2:07pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/4 "2021-05-19T14:07:35Z")

</div>

That is very strange. If GMT is in the path Julia will find it. The `run(touch..` was only to force a new precompile. What does this print?

```julia
readlines(`gmt --version`)

```

---

<div class="post-metadata">

### Author: ![shubh\_b](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shubh_b/32/20697_2.png) [@shubh\_b](https://discourse.julialang.org/u/shubh_b)
#### Post date: [May 19, 2021, 4:21pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/5 "2021-05-19T16:21:31Z")

</div>

In REPL it prints:

```julia
julia> readlines(`gmt --version`)
1-element Vector{String}:
 "6.1.1"

```

And if I run that line of code it throws error as below:

```julia
julia> run(`touch $(pathof(GMT))`)
ERROR: IOError: could not spawn `touch 'C:\Users\...\.julia\packages\GMT\wprG1\src\GMT.jl'`: no such file or directory (ENOENT)

```

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 19, 2021, 5:07pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/6 "2021-05-19T17:07:01Z")

</div>

Ok, so it found GMT but one need to force a rebuild to update that info in the prebuild cache (that was the intention of the `toutch` command but I forgot that it only works with `dev'd` versions).

Delete all files you find in `.julia/compiled/v1.6/GMT/`. This will force a rebuild.

---

<div class="post-metadata">

### Author: ![shubh\_b](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shubh_b/32/20697_2.png) [@shubh\_b](https://discourse.julialang.org/u/shubh_b)
#### Post date: [May 19, 2021, 5:26pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356/7 "2021-05-19T17:26:11Z")

</div>

@joa-quim Thank you so much! It worked actually.  
I can load and use `GMT.jl` module now without facing any warning/error. 🙂
