PyGPlates Installation error on Ubuntu 20.04

Hi, I have installed the correct versions of both libgdal-dev and boost and re-installed pygplates-py3 from Focal, however still cannot get past the same error of “Segmentation fault (core dumped)”. When I run the command that you have suggested, I get:

python3 -c “import pygplates; print(pygplates.version)”
2.2.0.28
Segmentation fault (core dumped)

I have also noticed something else strange, when I import the pygmt module I get no errors. However, if I import this after importing pygplates, I get errors. This does not occur with any other module. I have included this below:

Importing pygmt by itself:

python3 -c “import pygmt”

Importing pygmt before pygplates:

python3 -c “import pygmt; import pygplates”
Segmentation fault (core dumped)

importing pygmt after pygplates:

python3 -c “import pygplates; import pygmt”
Traceback (most recent call last):
File “”, line 1, in
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/init.py”, line 70, in
_begin()
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/session_management.py”, line 16, in begin
with Session() as lib:
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/clib/session.py”, line 183, in enter
self.create(“pygmt-session”)
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/clib/session.py”, line 329, in create
c_create_session = self.get_libgmt_func(
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/clib/session.py”, line 281, in get_libgmt_func
self._libgmt = load_libgmt()
File “/home/bhavik/anaconda3/envs/kinpy_forward/lib/python3.9/site-packages/pygmt/clib/loading.py”, line 59, in load_libgmt
raise GMTCLibNotFoundError(“\n”.join(error_msg))
pygmt.exceptions.GMTCLibNotFoundError: Error loading GMT shared library at ‘/home/bhavik/anaconda3/envs/pygmt/lib/libgmt.so’.
/home/bhavik/anaconda3/envs/pygmt/lib/./libgdal.so.29: undefined symbol: opj_encoder_set_extra_options
Error loading GMT shared library at ‘libgmt.so’.
libgmt.so: cannot open shared object file: No such file or directory
Segmentation fault (core dumped)

I do not know why importing pygplates causes errors with pygmt, as it is not a dependency. However, I have included the information in case you have seen this issue before.