# PyGMT installation problems

**URL:** https://forum.generic-mapping-tools.org/t/pygmt-installation-problems/2470
**Category:** PyGMT Q&A
**Created:** [December 26, 2021, 7:00pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-installation-problems/2470 "2021-12-26T19:00:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![manencatalan](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/manencatalan/32/1923_2.png) [@manencatalan](https://forum.generic-mapping-tools.org/u/manencatalan)
#### Post date: [December 26, 2021, 7:00pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-installation-problems/2470/1 "2021-12-26T19:00:25Z")

</div>

Hi,

I have PyCharm (Python 3.8) installed in my Macbook (BigSur) and works properly. I would like to highlight that I am new in this language.

I have followed the instructions provided at [https://www.pygmt.org/latest/install.html](https://www.pygmt.org/latest/install.html) to install PyGMT.  
.- Dependencies installed.  
.- I have executed the following instructions to install GMT and other dependencies:  
conda config --prepend channels conda-forge  
conda create --name pygmt python=3.9 numpy pandas xarray netcdf4 packaging GMT  
conda activate pygmt

.- I have executed the following instructions to install PyGMT :

conda install pygmt

When from PyCharm I execute some simple instructions to see that everything is OK

import pygmt  
pygmt.show\_versions()

The Pycharm env prompts 🙂

Traceback (most recent call last):  
File “/Users/manuelcatalan/Desktop/pythonProject/hello.py”, line 10, in   
import pygmt  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/site-packages/pygmt/ **init**.py”, line 70, in   
\_begin()  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/site-packages/pygmt/session\_management.py”, line 16, in begin  
with Session() as lib:  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/site-packages/pygmt/clib/session.py”, line 183, in **enter**  
self.create(“pygmt-session”)  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/site-packages/pygmt/clib/session.py”, line 329, in create  
c\_create\_session = self.get\_libgmt\_func(  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/site-packages/pygmt/clib/session.py”, line 281, in get\_libgmt\_func  
self.\_libgmt = load\_libgmt()  
File “/Users/manuelcatalan/Desktop/pythonProject/venv/lib/python3.8/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 ‘libgmt.dylib’.  
dlopen(libgmt.dylib, 6): image not found

I would like to highlight that I have executed from Terminal: export GMT\_LIBRARY\_PATH=$HOME/anaconda3/envs/pygmt/lib

Please could you help me?

Regards

Manuel

---

<div class="post-metadata">

### Author: ![weiji14](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/weiji14/32/33_2.png) [@weiji14](https://forum.generic-mapping-tools.org/u/weiji14)
#### Post date: [January 10, 2022, 4:00pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-installation-problems/2470/2 "2022-01-10T16:00:39Z")

</div>

Hi @manencatalan, sorry for the late reply. Could you try looking at the forum post at [pyGMT doesn't run on Pycharm but Jupyter](https://flint.soest.hawaii.edu/t/pygmt-doesnt-run-on-pycharm-but-jupyter/1450/2) and see if it helps? Maybe @zersorger could help you out with the PyCharm setup.

Just as a quick note, your `conda create` install step suggests you have installed Python 3.9 but the error message says Python 3.8, so you will need to find out how to use the correct Python virtual environment. Maybe something in the PyCharm editor settings?
