添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
豪气的荒野  ·  When using ...·  3 月前    · 
坏坏的蚂蚁  ·  CopyTextureSupport - ...·  9 月前    · 
低调的风衣  ·  A股公告精选 | ...·  1 年前    · 

PyGMT was highly recommended to me by a coworker and I wanted to install it on my laptop (MacOS, M1 chip). I followed the step-by-step instructions on
https://www.pygmt.org/latest/install.html but so far, I have only encountered the 'ModuleNotFoundError' , indicating that there is no module named pygmt.
I use Anaconda The Python version of my environment is 3.9.12. When I type conda list or my environment pygmt-env it says I have pygmt 0.6.1 and gmt 6.3.0 installed. I have set up the path to the module using export GMT_LIBRARY_PATH=$HOME/anaconda3/envs/pygmt_env/lib

I’ve removed an recreated my pygmt environment multiple times by now, each time following the steps outlined in the instructions and every time I get the same result: pygmt and gmt apparently installed, no module found. I’ve looked on around on the internet how to solve this problem but either I’ve tried it and it doesn’t work or I simply don’t understand what they mean. The weird thing is that I encountered the same problem on my previous laptop (Windows). I was wondering if there is someone here that could help me figure out what is the problem.

Many thanks!!
Thomas

Hi @thomas.schouten , thanks for trying PyGMT! Can I ask where you’re trying to use PyGMT from? Is it from a Jupyter notebook or an IDE like PyCharm/VS Code? Depending on where you’d like to run PyGMT, the instructions would vary, but these are some links that might help:

  • No module named pygmt - VS code
  • No module named pygmt in Spyder
  • My guess is that you’ll need to ensure that you’re running your code using the ‘pygmt’ kernel instead of the default Anaconda/Python kernel. If you could provide some error messages and/or screenshots, that will help us to debug the situation.

    Hi weiji14,

    Thanks for your answer and sorry for my late response!
    In the end, a colleague helped me out and we found out that the problem was I was unable to run the correct kernel in Jupyter Notebook. Using VSCode however, we were able to solve the problem :smiley:

    Thanks a lot!

    Thomas