You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to using Python in MATLAB, but would like to use fooof to analyze EEG data. I am using a Mac (Mojave 10.14.16) with MATLAB 2019a. As much as I would like to update both or either of these, this is a lab computer, so I have very little control over it.
I followed the steps here to install the most recent version of Python (v 3.8). I ran into the error addressed in the issue regarding missing 'py' variable. I ran the 'install numpy', but still get the same error (missing 'py'). I notice that in MATLAB, after running 'pyversion', it says I am using version 2.7. When I run IDLE, it says my version is 3.8.3. The library and home paths all indicate that the version of Python I am using is 2.7. Assuming that this is the issue that is preventing me from using fooof, how can I correct this?
Thank you for your time in advance.
The text was updated successfully, but these errors were encountered:
Hey @nishiyor - sorry for the delay in getting back to you!
If Matlab is showing you that it sees Python 2.7, then this is the issue. It means Matlab isn't seeing the correct Python. This won't work for using FOOOF, as FOOOF requires requires Python 3 (and some dependencies), which means you need to get Matlab to call the Python 3.8 version you have.
Have you tried the notes in the README about updating which Python Matlab is calling: https://github.com/fooof-tools/fooof_mat#calling-python-from-matlab
^Note that to do this approach, you might need to check where your Python 3.8 version lives, and make sure to use that specific path to update to.
If neither of those things work, let us know - but I'm not 100% sure what else to do. Note that this isn't a FOOOF problem, it's something to do with Matlab, on which I'm not an expert. You might need to look into Matlab stuff for how it calls Python. For newer version of Matlab, you might want to look into and try out pyenv: https://www.mathworks.com/help/matlab/ref/pyenv.html
Note that if you have Python 3.8 up and running, with IDLE, one option is to do your FOOOF fitting directly in Python. This can still be integrated into a Matlab based workflow. Some discussion about and examples of this are available here: https://github.com/fooof-tools/mat_py_mat
Hope that help! If you are still having trouble, let us know know, and we can try and trouble-shoot some more.
I am new to using Python in MATLAB, but would like to use fooof to analyze EEG data. I am using a Mac (Mojave 10.14.16) with MATLAB 2019a. As much as I would like to update both or either of these, this is a lab computer, so I have very little control over it.
I followed the steps here to install the most recent version of Python (v 3.8). I ran into the error addressed in the issue regarding missing 'py' variable. I ran the 'install numpy', but still get the same error (missing 'py'). I notice that in MATLAB, after running 'pyversion', it says I am using version 2.7. When I run IDLE, it says my version is 3.8.3. The library and home paths all indicate that the version of Python I am using is 2.7. Assuming that this is the issue that is preventing me from using fooof, how can I correct this?
Thank you for your time in advance.
The text was updated successfully, but these errors were encountered: