Auerilas / ecopy

Python tools for ecological data analyses
64 stars 27 forks source link

Can't import ecopy: ImportError: cannot import name '_isotonic_regression' #12

Closed essicolo closed 7 years ago

essicolo commented 7 years ago

Python 3.6, ecopy 1.2

Installed with conda install -c bioconda ecopy on Linux. The error also happens with pip install ecopy.

In [1]: import ecopy as ep
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-7-c8ecca1b9366> in <module>()
----> 1 import ecopy as ep

/home/essicolo/bin/anaconda3/lib/python3.6/site-packages/ecopy/__init__.py in <module>()
      2 
      3 
----> 4 from .regression import *
      5 from .ordination import *
      6 from .diversity import *

/home/essicolo/bin/anaconda3/lib/python3.6/site-packages/ecopy/regression/__init__.py in <module>()
      1 from .nls import nls
----> 2 from .isoregress import isotonic

/home/essicolo/bin/anaconda3/lib/python3.6/site-packages/ecopy/regression/isoregress.py in <module>()
      2 from pandas import DataFrame, Series
      3 import matplotlib.pyplot as plt
----> 4 from .isoFunc import _isotonic_regression
      5 
      6 class isotonic:

ImportError: cannot import name '_isotonic_regression'
Auerilas commented 7 years ago

I'm working on this. I think I have a solution, but I can't upload the package to PyPI. Ubuntu repositories still have twine 1.5, but that version no longer interacts with PyPI. They've changed the API. I'm having a difficult time getting a newer version of twine installed that will actually work.

Auerilas commented 7 years ago

Ok I think I have a fix in v1.2.2 on PyPI. I can't speak to the bioconda version, as I didn't write the recipe and don't know when it'll update (or if it does it automatically). Try installing via pip and see if that works.

essicolo commented 7 years ago

The pip-installed version 1.2.2 runs fine 👍 ! For bioconda, I'm not familiar with package distribution, but I think the recipe should be updated here: https://github.com/bioconda/bioconda-recipes/tree/master/recipes/

Auerilas commented 7 years ago

Great! Glad it works. Hopefully I didn't break anything else. Setup files are not something I know much about.

So far as bioconda, I'm not even sure who made the recipe. I didn't even know that ecopy was included. I'll have a look and see if I can sort it out.