Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run PyGMT on Windows #439

Closed
Ruaa93 opened this issue May 20, 2020 · 5 comments
Closed

Run PyGMT on Windows #439

Ruaa93 opened this issue May 20, 2020 · 5 comments
Labels
question Further information is requested
Milestone

Comments

@Ruaa93
Copy link

Ruaa93 commented May 20, 2020

Description of the problem
I just installed pygmt following the steps in https://www.pygmt.org/latest/install.html and the workaround for windows and setup the environment variable.

I want to know how to run the import pygmt to test it, cuz I run it multible times in spyder and jupyter and it gives me an error.

Full code that generated the error

import pygmt
pygmt.test()

Full error message

Python 3.6.10 (default, Mar  5 2020, 10:17:47) [MSC v.1900 64 bit (AMD64)]

Type "copyright", "credits" or "license" for more information.

 

IPython 7.14.0 -- An enhanced Interactive Python.

 

runfile('C:/Users/61410/.spyder-py3/temp.py', wdir='C:/Users/61410/.spyder-py3')

Traceback (most recent call last):

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\clib\loading.py", line 42, in load_libgmt

    libgmt = ctypes.CDLL(libpath)

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\ctypes\__init__.py", line 348, in __init__

    self._handle = _dlopen(self._name, mode)

 

OSError: [WinError 126] The specified module could not be found

 

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

 

  File "C:\Users\61410\.spyder-py3\temp.py", line 8, in <module>

    import pygmt

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\__init__.py", line 30, in <module>

    _begin()

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\session_management.py", line 16, in begin

    with Session() as lib:

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\clib\session.py", line 177, in __enter__

    self.create("pygmt-session")

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\clib\session.py", line 328, in create

    restype=ctp.c_void_p,

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\clib\session.py", line 276, in get_libgmt_func

    self._libgmt = load_libgmt()

 

  File "C:\Users\61410\anaconda3\envs\pygmt\lib\site-packages\pygmt\clib\loading.py", line 51, in load_libgmt

    raise GMTCLibNotFoundError(msg)

 

GMTCLibNotFoundError: Error loading the GMT shared library 'C:\Miniconda\envs\pygmt\Library\bin\gmt_w64.dll':

[WinError 126] The specified module could not be found

System information

  • Operating system:
  • Python installation (Anaconda, system, ETS):
  • Version of GMT:
  • Version of Python:
  • Version of this package:
  • If using conda, paste the output of conda list below:
output of conda list
PASTE OUTPUT OF CONDA LIST HERE
@welcome
Copy link

welcome bot commented May 20, 2020

👋 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
Copy link
Member

seisman commented May 20, 2020

@Ruaa93 When you follow the install instructions and run pip install pygmt, you're installing pygmt v0.1.0. However, to run pygmt on Windows, currently you have to install the master branch instead.

Please try:

pip install https://github.com/GenericMappingTools/pygmt/archive/master.zip

and follow the workaround for Windows.

We're working on the new release pygmt v0.1.1, it should be available in next few days.

@seisman seisman changed the title pygmt Run PyGMT on Windows May 20, 2020
@seisman seisman added the question Further information is requested label May 20, 2020
@weiji14 weiji14 added this to the 0.1.x milestone May 20, 2020
@seisman
Copy link
Member

seisman commented May 22, 2020

@Ruaa93 We just released PyGMT v0.1.1, which is expected to work smoothly on Windows. Please follow the latest install instructions.

@seisman seisman closed this as completed May 22, 2020
@Ruaa93
Copy link
Author

Ruaa93 commented May 30, 2020

it works, thanks a lot.

@Ruaa93
Copy link
Author

Ruaa93 commented May 30, 2020

@seisman I have a question, I'm trying to create a gravity map (for example Bouguer anomaly) using PYGMT, is there any similar codes or toturials to show how can gravity or magnatic maps can be created?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants