I tried the tutorials both as a Jupyter notebook and as a python script. When I tried executing the command
from brainsprite import viewer_substitute
bsprite = viewer_substitute(threshold=3, opacity=0.5, title="plot_stat_map",
cut_coords=[36, -27, 66])
bsprite.fit(stat_img, bg_img=anat)
I get the following error:
ImportError Traceback (most recent call last)
/var/folders/ck/szdm_4996pnb0qzqsb6pk4_r0000gp/T/ipykernel_67980/2301324209.py in
----> 1 from brainsprite import viewer_substitute
2
3 bsprite = viewer_substitute(threshold=3, opacity=0.5, title="plot_stat_map",
4 cut_coords=[36, -27, 66])
5 bsprite.fit(stat_img, bg_img=anat)
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/init.py in
1 """Brainsprite python API."""
----> 2 from .brainsprite import viewer_substitute
3
4 all = ['viewer_substitute']
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/brainsprite.py in
18 from nilearn.plotting.find_cuts import find_xyz_cut_coords
19 from nilearn.plotting.img_plotting import _load_anat
---> 20 from nilearn.reporting import HTMLDocument
21 from nilearn._utils.niimg_conversions import check_niimg_3d
22 from nilearn._utils.param_validation import check_threshold
ImportError: cannot import name 'HTMLDocument' from 'nilearn.reporting' (/Users/frkrohn/opt/anaconda3/lib/python3.9/site-packages/nilearn/reporting/init.py)
I am using Python 3.9.6 and a Jupyter in a conda environment