Skip to content

Installation error in JupyterNotebook :GMTCLibNotFoundError  #1485

Closed
@maihao14

Description

@maihao14

I install PyGMT in Google Colab (an online JupyterNotebook). When I tried to import pygmt, it will raise error

Full code that generated the error

!pip install pygmt
import pygmt

Full error message

---------------------------------------------------------------------------
GMTCLibNotFoundError                      Traceback (most recent call last)
<ipython-input-3-1f69d3ccfa65> in <module>()
----> 1 import pygmt
      2 pygmt.test()

5 frames
/usr/local/lib/python3.7/dist-packages/pygmt/clib/loading.py in load_libgmt(lib_fullnames)
     57 
     58     if error:
---> 59         raise GMTCLibNotFoundError("\n".join(error_msg))
     60 
     61     return libgmt

GMTCLibNotFoundError: Error loading GMT shared library at 'libgmt.so'.
libgmt.so: cannot open shared object file: No such file or directory

System information

The installation process runs successfully. But it seems cannot find GMT dependencies as above described.

!pip install pygmt

Collecting pygmt
  Downloading pygmt-0.4.1-py3-none-any.whl (267 kB)
     |████████████████████████████████| 267 kB 2.3 MB/s 
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from pygmt) (1.1.5)
Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from pygmt) (1.19.5)
Requirement already satisfied: netCDF4 in /usr/local/lib/python3.7/dist-packages (from pygmt) (1.5.7)
Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from pygmt) (21.0)
Requirement already satisfied: xarray in /usr/local/lib/python3.7/dist-packages (from pygmt) (0.18.2)
Requirement already satisfied: cftime in /usr/local/lib/python3.7/dist-packages (from netCDF4->pygmt) (1.5.0)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->pygmt) (2.4.7)
Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->pygmt) (2018.9)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas->pygmt) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas->pygmt) (1.15.0)
Requirement already satisfied: setuptools>=40.4 in /usr/local/lib/python3.7/dist-packages (from xarray->pygmt) (57.4.0)
Installing collected packages: pygmt
Successfully installed pygmt-0.4.1```

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions