raw-lab / mercat2

MerCat2: python code for versatile k-mer counting and diversity estimation for database independent property analysis for metaome data
https://github.com/raw-lab/mercat2/
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats' #8

Closed vpuller closed 8 months ago

vpuller commented 8 months ago

Error due to scikit-kbio:

ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats' (/home/smith/miniconda3/lib/python3.8/site-packages/scipy/stats/__init__.py)

This is likely related to recent installations (like numba) which might have modified versions of numpy and scipy, as previously the problem didn't occur.

Versions:
python : 3.8
scipy : 1.8.1
numpy : 1.22.4
skbio : 0.5.9

Related:
Error: cannot import name 'SpearmanRConstantInputWarning' from 'scipy.stats'
Cannot import name 'ConstantInputWarning' from 'scipy.stats' #4

decrevi commented 8 months ago

Hello, thank you for submitting this issue. I have not been able to reproduce this error. I am thinking it is because of the python version, and probably an outdated version of MerCat2. This issue has been fixed in the latest version of MerCat2, which currently runs on python versions 3.9 and 3.10.

Can you post the version of MerCat2 that you have installed? It might also help to know what OS you are using and which method you used to install MerCat2

Thanks again

vpuller commented 8 months ago

Hi, Sorry, I am actually not using MerCat2 at all. The issue emerged in the context of calculating UniFrac distances with skbio. I was able to revert to an earlier conda revision, where the code functions. The versions for this are: python : 3.8.17
scipy : 1.10.0
numpy : 1.24.4
skbio : 0.5.9

raw-lab commented 8 months ago

Thank you for using MerCat2! Because this isn't a MerCat2 issue but a UniFrac issue in skbio we are going to close this issue. Let us know if you have any issue with MerCat2.

many thanks, RAW lab