fooof-tools/fooof_mat

Unable to run fooof.m despite up to date python

MNwakamma opened this issue · 2 comments

I am getting this error in the fooof.m code:

Not enough input arguments.

Error in fooof (line 50)
freqs = py.numpy.array(freqs);_

_
& if it isn't that, I get this error despite installing numpy to python using the terminal ("pip3 install numpy"):

Unable to resolve the name py.numpy.array.

Error in fooof (line 50)
freqs = py.numpy.array(freqs);

I have the same issue. Someone any ideas?

Make sure you're not using Python within the Anaconda environment. It seems to cause issues. Also check your python version in Matlab and make sure it matches the one you see in the terminal when you enter python --version. To see if Matlab recognizes your py installation, simply type “pyversion” into matlab. Tell matlab where py install is if it doesn’t know
Example 1: pyversion(‘C:\Program Files\Python37\python.exe’)
Example 2: pyversion('C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\python.exe')
If you run the following in your terminal:
pip install fooof
it will auto install numpy and scipy for you. Hope this helps.