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

Unable to run FOOOF through MATLAB #30

Closed
JohnnyVVParr opened this issue Nov 1, 2023 · 3 comments
Closed

Unable to run FOOOF through MATLAB #30

JohnnyVVParr opened this issue Nov 1, 2023 · 3 comments

Comments

@JohnnyVVParr
Copy link

Hi guys,

I have followed the instructions for utilizing the MATLAB wrapper for FOOOF but I keep receiving the error:
'Unable to resolve the name 'py.fooof.FOOOF'.

I have installed python 3.9.10 from the python website and have followed the steps provided. Upon running "pyversion" in MATLAB everything seems fine:

version: '3.9'
executable: 'C:\Users\myusername\AppData\Local\Programs\Python\Python39\python.EXE'
library: 'C:\Users\myusername\AppData\Local\Programs\Python\Python39\python39.dll'
home: 'C:\Users\myusername\AppData\Local\Programs\Python\Python39'
isloaded:

But can't get the fooof script to run. HELP!

@JohnnyVVParr
Copy link
Author

Having read through some comments online it seems that MATLAB is actually talking to Python fine. Running other py. functions has no issues. As such, it seems this is an issue with fooof? I am trying to run the provided examples without luck:

Error in fooof (line 48)
fm = py.fooof.FOOOF(settings.peak_width_limits, ...

@JohnnyVVParr
Copy link
Author

ISSUE RESOLVED. It seems there was an issue with 'matplotlib'. To resolve, it typed pip install matplotlib into the command prompt and upon installation the fooof script worked fine.

@nb-bu
Copy link

nb-bu commented Jan 17, 2024

Hi Johnny,
may I ask if you followed any specific steps (other than the reinstall of matplotlib)?

Me (and two other guys: #29) are running into the same issue. Unfortunately, simply reinstalling matplotlib didn't solve the problem. I'm running out of ideas after googling and trying solutions for 2 days straight..

I'm using Matlab 2023b on a Mac (M1). Have tried both with Anaconda and now more recently with the "normal" Python 3.10 from python.org. Matlab's pyenv recognizes the correct Python version and (after some troubleshooting) finally lets me use numpy; but still can't recognize fooof (shooting the same error as above), even though it's installed in the correct folder.

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