Installation issue

Hello,

I would love to get PyGMT working. Everything seemed to install OK after “conda create --name pygmt --channel conda-forge pygmt” and “conda activate pygmt”. This created a new environment called “pygmt”. Great!

Then I tried to install Jupyter Notebook in this new environment, and I get an error:

ResolvePackageNotFound:

  • python=3.1

Any help welcome!

Dear @Trevor,
Did you try within pygmt environment?:

conda install -c conda-forge notebook

Also take a look to Jupyter to try with ‘pip’ command

Stay safe,
Tonino

Hi @Trevor, sorry for the late reply. This is a known issue when using Python 3.10 (which gets converted to Python 3.1 by conda, silly yes I know). Following the solution at No module named 'pygmt', you can try doing conda install python=3.9 jupyterlab to force using Python 3.9 instead. Let us know if that works for you.

Thanks for responding! I have PyGMT working now with Python 3.9 … seems pretty stable. Looking forward to more functionality being added … grdmath would be a good one.

Cool, glad to hear you got it working!

grdmath is a tricky one. There’s a reference implementation being worked on at RFC: Wrap grdmath by weiji14 · Pull Request #1527 · GenericMappingTools/pygmt · GitHub but it will take some time (read: months). For most basic math operations, I would actually recommend doing it in xarray instead (see Computation).

1 Like