You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
import pygmt raises ModuleNotFoundError in Jupyter #2113
Hello, thank you and your team for a job well done !My PYGMT does not work properly. Modulenotfounderror will appear when it is called after installation. However, when I go to PIP or Conda to install it, it says that it has been installed.
And I'm using windows 10 professional, cpu is 11th Gen Inter i7-11700. python software I'm using conda 4.14.0 platform, current python version is 3.9.12. GMT version installed on computer is 6.4.0, pygmt installed during debugging is latest version v0.7.0. During debugging I have used python 3.10, 3.8, 3.7 and other virtual environments, none of them will make pygmt work.
I failed to solve the problem by following some solutions on the Internet, so I had to turn to your development team for help, thank you!
my email: [email protected] ,looking forward to your reply or email !
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
pygmt installed with the 6.4.0 installer downloaded from the gmt website; then pygmt installed with the “conda install --channel conda-forge pygmt” statement.
The error message says “ModuleNotFoundError: No module named 'pygmt'”, but checking the package will find that pygmt is already installed, and the error message is as shown.
Cool, I'm starting to think these instructions should go into the installation page as we've seen this ModuleNotFoundError pop up 5 or more times already. Let's close this issue once we've added the documentation.
Cool, I'm starting to think these instructions should go into the installation page as we've seen this ModuleNotFoundError pop up 5 or more times already. Let's close this issue once we've added the documentation.
I've never had any problems like this on Linux and macOS.
Looking at the forum posts, it seems to be mostly Anaconda Windows users? Maybe something different in the setup. Still, the instructions also work for Linux/macOS so won't hurt I guess.
Cool, I'm starting to think these instructions should go into the installation page as we've seen this ModuleNotFoundError pop up 5 or more times already. Let's close this issue once we've added the documentation.
I've never had any problems like this on Linux and macOS.
I ran into the same problem on my m1 Macbook this past July, but I didn't try to ask anyone else about it at the time, and I thought it might be a problem with the installation rules for the new version of anaconda.
Looking at the forum posts, it seems to be mostly Anaconda Windows users? Maybe something different in the setup. Still, the instructions also work for Linux/macOS so won't hurt I guess.
Tomorrow I'll try this method to solve the same problem on my Macbook, maybe the problem is in the anconda.
Cool, I'm starting to think these instructions should go into the installation page as we've seen this ModuleNotFoundError pop up 5 or more times already. Let's close this issue once we've added the documentation.
I've never had any problems like this on Linux and macOS.
I still decided to test it before going to bed so I brought the Mac back to my dorm room and it installed in one go with no errors.
Professor Tian, I'm sorry for my misremembering, I solemnly apologize for that, I think it was something else that failed me in July.
Probably the same as what @weiji14 said: (Maybe something different in the setup. Still, the instructions also work for Linux/macOS so won't hurt.).
Activity
welcome commentedon Sep 8, 2022
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
seisman commentedon Sep 8, 2022
Please provide more information so that we can help you:
jason996cj commentedon Sep 8, 2022
Hello Professor Tian, my situation is as follows.
seisman commentedon Sep 8, 2022
Did you restart the kernel or Jupyter after installing pygmt? If not, you should try it.
jason996cj commentedon Sep 8, 2022
Yes, I've restart them. I've restart and reinstalled many times.
weiji14 commentedon Sep 8, 2022
Try following https://forum.generic-mapping-tools.org/t/weird-jupyter-vs-command-prompt/1644/2. Specifically
conda activate pygmt python -m ipykernel install --user --name pygmt #to install conda env properly jupyter kernelspec list --jsonYou'll then need to restart your Jupyter, open your notebook and select the 'pygmt' kernel. See e.g. https://forum.generic-mapping-tools.org/t/no-module-named-pygmt-vs-code/1231/9
jason996cj commentedon Sep 8, 2022
It's solved, thanks so much!
weiji14 commentedon Sep 8, 2022
Cool, I'm starting to think these instructions should go into the installation page as we've seen this ModuleNotFoundError pop up 5 or more times already. Let's close this issue once we've added the documentation.
seisman commentedon Sep 8, 2022
I've never had any problems like this on Linux and macOS.
weiji14 commentedon Sep 8, 2022
Looking at the forum posts, it seems to be mostly Anaconda Windows users? Maybe something different in the setup. Still, the instructions also work for Linux/macOS so won't hurt I guess.
jason996cj commentedon Sep 8, 2022
I ran into the same problem on my m1 Macbook this past July, but I didn't try to ask anyone else about it at the time, and I thought it might be a problem with the installation rules for the new version of anaconda.
jason996cj commentedon Sep 8, 2022
Tomorrow I'll try this method to solve the same problem on my Macbook, maybe the problem is in the anconda.
jason996cj commentedon Sep 8, 2022
I still decided to test it before going to bed so I brought the Mac back to my dorm room and it installed in one go with no errors.
Professor Tian, I'm sorry for my misremembering, I solemnly apologize for that, I think it was something else that failed me in July.
Probably the same as what @weiji14 said: (Maybe something different in the setup. Still, the instructions also work for Linux/macOS so won't hurt.).
[-]pygmt ModuleNotFoundError.[/-][+]import pygmt raises ModuleNotFoundError in Jupyter[/+]