Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

06_analysis_multivariate “ImportError: cannot import name analyze” #38

Open
donghui1119 opened this issue Feb 12, 2023 · 4 comments

Comments

@donghui1119
Copy link

Summary

It seems to be a problem with "nibabel", because "ImportError: cannot import name analyze" will appear when importing nibabel. But I still have this problem after I delete "nibabel" and reinstall it. I installed "nibabel==2.5.1" in python2.7 on my laptop, and there is no error in "import nibable"

Actual behavior

Expected behavior

How to replicate the behavior

Script/Workflow details

from mvpa2.suite import *


ImportError Traceback (most recent call last)
in ()
2 import os
3 from os.path import basename
----> 4 from mvpa2.suite import *

/opt/miniconda-latest/envs/mvpa/lib/python2.7/site-packages/mvpa2/suite.py in ()
225 from mvpa2.misc.plot.base import *
226 from mvpa2.misc.plot.erp import *
--> 227 from mvpa2.misc.plot.scatter import *
228 if externals.exists(['griddata', 'scipy']):
229 from mvpa2.misc.plot.topo import *

/opt/miniconda-latest/envs/mvpa/lib/python2.7/site-packages/mvpa2/misc/plot/scatter.py in ()
14 import sys, os
15 import pylab as pl
---> 16 import nibabel as nb
17 import numpy as np
18

/opt/miniconda-latest/envs/mvpa/lib/python2.7/site-packages/nibabel/init.py in ()
60
61 # module imports
---> 62 from . import analyze as ana
63 from . import spm99analyze as spm99
64 from . import spm2analyze as spm2

ImportError: cannot import name analyze

Please put URL to code or code here (if not too long).

Platform details:



Execution environment

Ubuntu20.04
Choose one

  • Container [Tag: latest]
  • My python environment inside container [Base Tag: latest]
@miykael
Copy link
Owner

miykael commented Feb 13, 2023

This is a strange error. I'm curious if it's more connected to PyMVPA than nibabel. Unfortunately, PyMVPA hasn't been improved since more than 4-years. At the time that I created fmriflows it was a great tool, but today I would rather recommend to switch to nilearn as it is still very actively developed and can do the same thing, plus much more.

@donghui1119
Copy link
Author

Thanks for your anwers, miykael. Yes, fmriflows is convenient and efficient to process data. I have run the previous process smoothly,I am preparing to introduce fmriflows to other students in the laboratory. But I also think that nilearn will be better for MVPA than pyMVPA.

@miykael
Copy link
Owner

miykael commented Feb 14, 2023

For some tutorials on how to use nilearn, well, there's the nilearn documentation and the nilearn user guide. Additionally, you might find this resource helpful as well - in particular the following notebooks:

@donghui1119
Copy link
Author

Thanks for your sharing and kindness!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants