GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
759 stars 220 forks source link

No module issue when importing pygmt #1326

Closed BRseis closed 3 years ago

BRseis commented 3 years ago

Hi, I'm new to gmt and pygmt. I tried installing it according the scripts for anaconda but when i try to test it it doesn't recognize pygmt as a module. Removed and reinstalled anaconda and its packages and then reinstalled pygmt. Now i got pygmt as a kernel but yet i get the same result when i try to import pygmt . I am using windows 10. image I would appreciate any help

welcome[bot] commented 3 years ago

👋 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.

core-man commented 3 years ago

Did you activate the environment within which you install pygmt, e.g., run conda activate pygmt if the environment name is pygmt.

BRseis commented 3 years ago

yes I did. checked to make sure... image

core-man commented 3 years ago

How about running import pygmt under pygmt environment using PowerShell directly.

I am only a linux user, but did you open the notebook via the same powershell after you activated the pygmt environment.

maxrjones commented 3 years ago

It could be a path error. If you type which python after activating the conda environment, the path should show python inside the conda env, rather than a different python installation. (edit: this might be where python for Windows).

p.s. Welcome to the community! For future questions, please post in the PyGMT Q&A section of the user forum. You are welcome to post bug reports/feature requests here on GitHub.

BRseis commented 3 years ago

It could be a path error. If you type which python after activating the conda environment, the path should show python inside the conda env, rather than a different python installation. (edit: this might be where python for Windows).

p.s. Welcome to the community! For future questions, please post in the PyGMT Q&A section of the user forum. You are welcome to post bug reports/feature requests here on GitHub.

thank you. I will try their forum too.

P.S. i tried, nothing changed... image

seisman commented 3 years ago

The same issue was posted on the forum (https://forum.generic-mapping-tools.org/t/no-module-issue-when-importing-pygmt/1769).

I'm closing the issue.

BRseis commented 3 years ago

I opened the issue there since you guys instructed me to address there...

maxrjones commented 3 years ago

I opened the issue there since you guys instructed me to address there...

Yes, thank you for opening the issue on the forum. We'll continue the conversation over there.