cbrnr / mnelab

MNELAB – a GUI for MNE
BSD 3-Clause "New" or "Revised" License
239 stars 69 forks source link

Pip installing on windows 10 #367

Closed Mattlab-hub closed 1 year ago

Mattlab-hub commented 1 year ago

Hi, I am trying to get this to run on windows 10, and I have ran into a few issues, some that look previously solved. After pip installing mnelab, typing in mnelab to the command window gives me an error sating that the command is not recognized, however, as one of the other fixes points out typing in python -m mnelab does launch the program.
The next problem is the the interface seems to be missing the icons. the buttons do work, but the icons on them are just missing. Last, I cannot seem to read in epoched data. When I try open an epoched fif file it just gives me an error that says no raw data detected. I imagine I should be able to import epoched fif files? Please let me know if there are any work around, fixes, or if I am just flat out missing something.

Thanks, Matt

cbrnr commented 1 year ago

These are three more or less separate issues. Let me try to answer each of them.

First, it seems like the directory with the mnelab executable is not on your path. Exactly where this directory is located depends on how you installed Python and how you installed mnelab. Specifically, if you installed Python with the official installer from python.org for all users (i.e. as administrator somewhere in C:\Program Files), and then you installed mnelab as a user (i.e. not as administrator), the binary ends up somewhere in your user profile, which is not on your path by default. Therefore, the solution in this case is to add that directory to your path.

Regarding the missing toolbar icons, which MNELAB version did you install? This problem popped up once in a while, but each time for a different reason. I will also try to replicate on my Windows machine.

Re epoched data, this is still a problem because MNELAB uses the file extension to assign a reader. Since FIFF can store raw and epoched data, currently only raw is supported. This is already mentioned in #160.

Mattlab-hub commented 1 year ago

Thanks for getting back to me. I did try installing normally and as administrator, both resulting in the files being sent to my user/AppData/local/python... directory, resulting in me not being able to use the direct call to open the program. The git install sends it to the first level of my user directory. A more expected place, but not program files still. I cannot seem to get it to go to program files no matter what I try. I figured the icons were missing possibly due to it not installing properly with pip or git.

The versions I tried installing were both the regular pip install mnelab and pip install mnelab[full] for the 0.8.5 version, and the git install for the development version. All resulting in an instillation without icons.

cbrnr commented 1 year ago

When using Python installed from the Microsoft Store, I can confirm that icons are indeed missing. As I mentioned before, I had to add a folder to my user path in order to start mnelab. This folder will likely be unique for each installation, but in my case it was

%LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts

When installing with pip install mnelab, you should see a bunch of warnings related to this folder being not on your path. You can copy this path and paste it into your system path in the user environment variables settings.

However, when installing Python from the official website (I installed 3.10.9), everything works as expected, including icons. Can you please try this method? Please do not change any defaults in the installer except for "Add python.exe to PATH" (which should be enabled). Importantly, do NOT install for all users (otherwise the folder where mnelab resides will not be on your PATH).

Mattlab-hub commented 1 year ago

Yes, I just installed the newest version of python from the official python website (version 3.11) and I reinstalled mnelab. All worked as expected and the icons are present. thanks so much!

As far as the loading epoched fif files, is this in active development? I have a group of non-python coders that would really benefit from this program since it seems to be the most streamlined gui I have come across.

cbrnr commented 1 year ago

Great that it finally works! There is already an issue for the missing path entry here, and the missing icons issue is probably something I will have to report. Meanwhile, I recommend the official installers, which should probably always be the go-to method to install Python even in the future.

Regarding loading epoched files, this is something that I will be working on next as it is probably the most important missing feature right now.

cbrnr commented 1 year ago

If you want to follow the progress of loading epoched data, please monitor #160.