I'm trying to plot .nii
data using nibabel
and nilearn
. I'm using python 3.5 and installed both packages successfully. But, when I'm trying to import the module, it's returning -
ImportError: No module named 'nilearn'.
What am I missing here?
You're probably installing packages into a different Python installation than you're running your code in. Try the following commands:
That'll probably be enough to get this script running. However, as you continue to develop more applications, installing and upgrading libraries at the root level will mean break your applications. Look into Virtual Environments to give each application its own copy of Python and libraries. I also highly recommend looking into Anaconda Python and its environment creator
conda
to do most of this for you.