# No module named 'pygmt' in Centos python3 running

**URL:** https://forum.generic-mapping-tools.org/t/no-module-named-pygmt-in-centos-python3-running/3169
**Category:** PyGMT Q&A
**Created:** [July 30, 2022, 3:38pm UTC](https://forum.generic-mapping-tools.org/t/no-module-named-pygmt-in-centos-python3-running/3169 "2022-07-30T15:38:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alex0516](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@alex0516](https://forum.generic-mapping-tools.org/u/alex0516)
#### Post date: [July 30, 2022, 3:38pm UTC](https://forum.generic-mapping-tools.org/t/no-module-named-pygmt-in-centos-python3-running/3169/1 "2022-07-30T15:38:30Z")

</div>

Dear there,

I encountered one problem about the use of _pygmt_ in _Centos_ command line. The _python3_ was installed by the installation of _Anaconda3_, then in _conda_ environment the following command lines were run:

> conda create --name pygmt --channel conda-forge pygmt  
> conda activate pygmt

Then

> import pygmt  
> pygmt.show\_versions()

It seemed good! but when I inserted _import pygmt_ to the python script and ran it in command line (_python3 pythonscript.py_), error came up with _ModuleNotFoundError: No module named ‘pygmt’_. That’s similar when _pygmt_ was just imported in _python3_ environment.

In addition, another _python_ (version 3.10.5) in _anaconda3/envs/pygmt/bin_ was found, which is different with python 3.9.12 in anaconda3 directory!

Is there any problem for the installation? why is there an independent _bin_ for _pygmt_? how to _import pygmt_ freely in _python3_ environment or script? Many thanks.

Alex
