CaImAn
CaImAn copied to clipboard
cannot import name 'file_hash' from 'pooch.utils'
- Tell us a bit about your setup:
-
Operating system (Linux/macOS/Windows): Ubuntu 20.04.3 LTS
-
Python version (3.x): 3.9
-
Working environment (Python IDE/Jupyter Notebook/other): Jupyter Lab
-
CaImAn version*: 1.9.0 + 1.9.1 + 1.9.2 dev
-
CaImAn installation process (
pip install .
/pip install -e .
/conda): conda + conda + pip install -e .
-
Describe the issue that you are experiencing Trying to import caiman.
-
Copy error log below
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/tmp/ipykernel_1345334/3686630611.py in <module>
24 level=logging.DEBUG)
25
---> 26 import caiman as cm
27 from caiman.base.movies import load
28 from caiman.summary_images import local_correlations
~/Git/CaImAn/caiman/__init__.py in <module>
2
3 import pkg_resources
----> 4 from .base.movies import movie, load, load_movie_chain
5 from .base.timeseries import concatenate
6 from .cluster import start_server, stop_server
~/Git/CaImAn/caiman/base/movies.py in <module>
28 import scipy
29 from scipy.io import loadmat
---> 30 from skimage.transform import warp, AffineTransform
31 from skimage.feature import match_template
32 import sklearn
~/anaconda3/envs/lindoscope_1p/lib/python3.9/site-packages/skimage/__init__.py in <module>
133 img_as_bool,
134 dtype_limits)
--> 135 from .data import data_dir
136 from .util.lookfor import lookfor
137
~/anaconda3/envs/lindoscope_1p/lib/python3.9/site-packages/skimage/data/__init__.py in <module>
62
63 try:
---> 64 from pooch.utils import file_hash
65 except ModuleNotFoundError:
66 # Function taken from
ImportError: cannot import name 'file_hash' from 'pooch.utils' (/home/obarnste/anaconda3/envs/lindoscope_1p/lib/python3.9/site-packages/pooch/utils.py)
I think this is a problem with a moved function in pooch used by Scikit-Image, see these threads: https://github.com/fatiando/pooch/issues/252 https://github.com/scikit-image/scikit-image/issues/5528
Manually downgrading pooch to 1.4.0 solves the issue for now.
This looks like an upstream issue; it's good to have the issue filed so we're aware of it here, but it's probably nothing we can fix. You might be able to file a bugfix against the scikit-image conda package to have them pin the version until upstream sorts this out.
Closing because it appears the issue is resolved.