# Upgrading Julia for GMT.jl users

**URL:** <https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223>\
**Category:** General Usage\
**Tags:** question, juliaup\
**Created:** [June 4, 2022, 2:05am UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223 "2022-06-04T02:05:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leon6/32/205483_2.png) [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Post date:** [June 4, 2022, 2:05am UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/1 "2022-06-04T02:05:23Z")

</div>

What is the best way to upgrade Julia when you have the GMT.jl package installed?

I’m on Mac OS (Intel Processor). It happened a few times that after upgrading to a newer version of Julia, I can no longer use my GMT.jl. I ended up reinstalling my entire Mac OS system in order to fix the issue.

I wonder if there is a better way of upgrading Julia to the latest version without messing up with my GMT.jl package. Thanks.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [June 4, 2022, 8:04am UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/2 "2022-06-04T08:04:07Z")

</div>

Well there are several important layers here.

You may want to use juliaup to manage your Julia versions:

> **[GitHub - JuliaLang/juliaup: Julia installer and version multiplexer](https://github.com/JuliaLang/juliaup)**
>
> Julia installer and version multiplexer. Contribute to JuliaLang/juliaup development by creating an account on GitHub.

The second item is project environment hygiene. Rather than adding all your packages to your shared `@1.7` environment, create specific environments for each project. Put the Project.toml and Manifest.toml into version control.

GMT appears to require external binaries outside of the BinaryBuilder world, so this likely adds some complications. In some cases the package appears to use conda-forge. By default Julia creates it’s own conda-forge environment within the Julia depot (by default this is in` ~/.julia`). One step you might want to consider is using a specific depot for GMT. This can be altered via the `JULIA_PROJECT` environmental variable.

It really should not be necessary to reinstall the entire operating system. Before doing that, I would try moving the `~/.julia` folder to a new location, and then starting with a clean depot.

The latest stable Julia version is 1.7.3. Versus other 1.7.x releases, this should only contain fixes. For your case I would not recommend trying 1.8 or 1.9 before they are released.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [June 4, 2022, 9:32am UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/3 "2022-06-04T09:32:12Z")

</div>

@mkitti is totally right and I second that: there is absolutely no need to reinstall an operating system if something like Julia or Python stops working. Especially Julia is really living inside a single folder and does not mess with your system’s filesystem: everything is in `~/.julia`.

If you want to be extra cautious with upgrading Julia, do something like `mv ~/.julia ~/.julia_backup` and if anything goes wrong with the latest version of Julia, just delete `~/.julia` and move the backup back and simply start the old Julia version.

---

<div class="post-metadata">

**Author:** ![Leon6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leon6/32/205483_2.png) [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Post date:** [June 4, 2022, 1:09pm UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/4 "2022-06-04T13:09:36Z")

</div>

Many thanks all for the replies. This is very helpful.

---

<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:** [June 4, 2022, 2:26pm UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/5 "2022-06-04T14:26:07Z")

</div>

Sorry but I can’t make a sense out of this and it’s the first time I hear it. What was the error after the Julia upgrade? Do you have a previously installed GMT or the one that is automatically installed by conda when a system one is not found?

---

<div class="post-metadata">

**Author:** ![Leon6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leon6/32/205483_2.png) [@Leon6](https://discourse.julialang.org/u/Leon6)\
**Post date:** [June 4, 2022, 11:24pm UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/6 "2022-06-04T23:24:41Z")

</div>

Unfortunately, I don’t remember the error messages or the details about how I installed my GMT.jl.

Below is how I installed my latest GMT.jl on my current system:

1. Install homebrew:  
/bin/bash -c “$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))”

2. Install Ghostscript:  
brew install ghostscript

3. Install GMT.jl  
Open Julia  
] add GMT

---

<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:** [June 5, 2022, 1:10pm UTC](https://discourse.julialang.org/t/upgrading-julia-for-gmt-jl-users/82223/7 "2022-06-05T13:10:26Z")

</div>

If you didn’t install GMT after 1. doing step 3. alone would have been enough.
