1

I have a very basic question. I want to install a new module on my computer in order to use it in Python (via Spyder). When I install the package via pip everything seems to work fine. When I want to import the package in my script it says that there is no module by that name (see scrennshot below)

Any suggestions what might be the problem?

Thanks a lot :)

screenshot of this problem

maxed
  • 11
  • 3

3 Answers3

1

You're using pip3 to install.

Try installing using pip install nibabel.

Failing that, I would refer you to the following question: Which pip is with which python?

This is a common pitfall of using different versions of Python and pip.

vtasca
  • 1,660
  • 11
  • 17
0

Thanks for asking the question. Have tried conda install Since we are in anaconda dev env.

If you are using windows Windows: Click Start, search, or select Anaconda Prompt from the menu and use that terminal please find the reference https://docs.anaconda.com/anaconda/install/verify-install/

Jaymit Gupta
  • 567
  • 5
  • 13
0

I think

/Applications/Spyder.app/Contents/MacOS/python -m pip install nibabel or /Applications/Spyder.app/Contents/MacOS/python -m pip3 install nibabel

will solve your problem

0xF4D3C0D3
  • 747
  • 1
  • 5
  • 15
  • ok there seems to be something really not working with the way i set up python/spyder. trying to execute it in my terminal throws a whole lot of error :/ Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) ... Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' – maxed Oct 22 '21 at 11:44
  • wow that's a horrible error indeed. I have no idea – 0xF4D3C0D3 Oct 22 '21 at 11:51