Problems with nistats

Hi all,

I’ve been using nistats with great pleasure over the last years. However, after not using it for 4 months I wanted to rerun some old scripts and now the first_level_model function fit() gets stuck. I’m running nistats 0.0.1b1 on python3.6.9. I then tried to install the latest version of nistats: 0.0.1rc0 with python version 3.7.6 and here I run into the problem that the FirstlevelModel class can’t be loaded with the following error: ModuleNotFoundError: No module named ‘sklearn.externals.joblib’

The github page where issues are reported does not seem to be active anymore, so I was wondering if someone here might have an idea how to proceed?

Thanks for your help,

Sebastian

Nistats has been merged into nilearn, although I don’t think nilearn has made a release since the merge. You could try installing the current version from GitHub. There are installation instructions on the Nilearn website here (look at the “Get source” tab).

The documentation is a little light at the moment, since the nilearn website only renders the most recent stable version, but I believe that nistats is now housed in the nilearn.glm module with not too many structural changes, so it should be fairly similar to how it was when it was its own package.

This looks like a version issue. It appears that sklearn.externals.joblib was removed in scikit-learn v0.23. If the issue persists in the nilearn version of nistats, then you can try downgrading your local version of sklearn to v0.21 or earlier.

2 Likes

Sorry for the invonvenience. We should release nilearn in the coming weeks.

1 Like