csdms / pymt

A Python toolkit for running and coupling Earth surface models
https://pymt.readthedocs.io
MIT License
52 stars 20 forks source link

Missing udunits2 in installation #131

Closed gregtucker closed 3 years ago

gregtucker commented 3 years ago

(1) Install from conda forge:

conda install pymt -c conda-forge

(installation completes)

Test in ipython shell:

In [1]: import pymt
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-a062ed831948> in <module>
----> 1 import pymt

~/Dev/Pymt/pymt/pymt/__init__.py in <module>
      1 import pkg_resources
      2 
----> 3 from ._udunits2 import UnitSystem
      4 from .model_collection import ModelCollection
      5 

ModuleNotFoundError: No module named 'pymt._udunits2'

(2) Install from source

git clone https://github.com/csdms/pymt.git

python setup.py install

(does stuff)

Test of importing pymt: same result as above.

mcflugen commented 3 years ago

@gregtucker I've been trying to reproduce this but I'm unable to. What version of pymt do you have installed?

gregtucker commented 3 years ago

It looks like version 1.3.1.dev0

mcflugen commented 3 years ago

@gregtucker I've created a new release of pymt that contains a change that might fix your issue. The following works for me,

$ conda create -n pymt pymt
$ conda activate pymt
$ python -c 'import pymt; print(pymt.__version__)'
1.3.1

When you have time, would you please give that a try and see if you still get the same error (or maybe a new one?!)?

gregtucker commented 3 years ago

@mcflugen yes that worked! Nice work. Closing this issue.