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?
On
If you want to check and see if pip is installing the modules to the right place you can run:
which pip3
which python3
A virtualenv would probably fix the problem.
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
condato do most of this for you.