# Errors associated with "using GMT"

**URL:** <https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393>\
**Category:** Performance\
**Tags:** question, gmt\
**Created:** [October 26, 2021, 9:42am UTC](https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393 "2021-10-26T09:42:27Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [October 26, 2021, 11:21pm UTC](https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393/18 "2021-10-26T23:21:34Z")

</div>

> [@leon](#):
>
> Is there an instruction page so that I can uninstall everything and reinstall them all over again?

I am not on a MacOS, never used GMT, however, how about starting from scratch in a brand new Julia environment and using Conda that comes with PythonCall.jl. This is not about “uninstall everything and reinstall them all over again”, however, it should bring pretty similar results (I have not tried it):

```julia
# Creating a new project directory
    mkdir path/GMTenv # make a directory for your project environment 
# Start Julia
    julia
# Activating a new Julia environment;
    using Pkg
    cd("path/GMTenv") # cd to your project environment
    pwd() # double check if you are in the right directory
    Pkg.activate(".") # activate a new environment
    Pkg.instantiate()
    Pkg.status() # double check if its activated
# Adding and using PythonCall.jl;
    Pkg.add(url="https://github.com/cjdoris/PythonCall.jl.git") # adding master version of PythonCall 
    using PythonCall
# Checks    
    PythonCall.Deps.status() # check
    PythonCall.Deps.conda_env() # check
    PythonCall.Deps.user_deps_file() # check
# Installing GMT from conda channel;
    PythonCall.Deps.add(conda_channels = ["conda-forge"]) # add conda-forge chennel ## COMMENT OUT WHEN RUNNING julia sample.jl
    PythonCall.Deps.add(conda_packages = ["gmt=6.2"]) # add gmt 6.2. 
    # If by any chance you need additional dependencies like netcdf install them in a similar way
# Checks
    PythonCall.Deps.status() # check
    PythonCall.Deps.conda_env() # check
    PythonCall.Deps.user_deps_file() # check
# Exit julia (IT WILL BE NEEDED AFTER ADDING CONDA PACKAGES)
    exit()

```

```julia
# And start julia again (IT WILL BE NEEDED AFTER ADDING CONDA PACKAGES)
    julia
# Activating a Julia environment;
    using Pkg
    cd("path/GMTenv") # cd to your project environment
    pwd() # double check if you are in the right directory
    Pkg.activate(".") # activate a new environment
    Pkg.instantiate()
    Pkg.status() # double check if its activated
# By using PythonCall, your new Conda environment will be activated in your Julia project environment
    using PythonCall
# Checks    
    PythonCall.Deps.status() # check
    PythonCall.Deps.conda_env() # check
    PythonCall.Deps.user_deps_file() # check 
# Add GMT.jl
    Pkg.add(GMT) ## COMMENT OUT WHEN RUNNING julia sample.jl
    using GMT
# Your sample project code goes here:

```

---

_[View the full topic](https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393)._
