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

Comments on HED MATLAB tools documentation #207

Open
dungscout96 opened this issue Jan 11, 2023 · 2 comments
Open

Comments on HED MATLAB tools documentation #207

dungscout96 opened this issue Jan 11, 2023 · 2 comments
Assignees

Comments

@dungscout96
Copy link
Member

dungscout96 commented Jan 11, 2023

Some comments/issues as I tried out the HED MATLAB Python tools tutorial:

  • In Step 4, we should instruct users on how to find which pip is associated with their python.
    On MacOS, python -m pip --version will give the path to the library. which pip supposed to point to pip executable of the python environment the terminal is in

  • Typo in Step 4: system('"C:\Program Files\Python39\Scripts\pip" install hedtools') has extra double quote

  • pyrun was only introduced in MATLAB 2021b, so minimum MATLAB version required would be 2021b

  • python < 3.10 no longer has installer for MacOS. Users would have to install from source, which is difficult. I tried using Python installed via Anaconda and it seemed to work. We might want to add this to the instruction.

  • The command at the end of Step 4 doesn't work:
    pyrun("from hed import _version as vr; print(f'Using HEDTOOLS version: {str(vr.get_versions())}')")
    Module _version was not found, I tried version as well but also didn't work

  • I tried out the example MATLAB wrapper function for HED Python tools and received error:

Unable to resolve the name 'py.hed.tools.BidsDataset'.

Error in validateHedInBids (line 12)
    bids = py.hed.tools.BidsDataset(dataPath);

Error in testScript (line 4)
issueString = validateHedInBids(dataPath);
@VisLab
Copy link
Member

VisLab commented Jan 11, 2023

Thanks for trying ---

* In Step 4, we should instruct users on how to find which pip is associated with their python.
  On MacOS, `python -m pip --version` will give the path to the library. `which pip` supposed to point to pip executable of the python environment the terminal is in

Good idea.

* Typo in Step 4: `system('"C:\Program Files\Python39\Scripts\pip" install hedtools')` has extra double quote

The extra double quotes is required in Windows because of the blank in the directory name. Did it give an error on the MAC?

* `pyrun` was only introduced in MATLAB 2021b, so minimum MATLAB version required would be 2021b

Notice that the wrappers don't use pyrun at all, they call the Python directly.

* python < 3.10 no longer has installer for MacOS. Users would have to install from source, which is difficult. I tried using Python installed via Anaconda and it seemed to work. We might want to add this to the instruction.

@dungscout96 @monique2208 could you collaborate and come up with a paragraph on this for Step 1 and possibly later steps.

* The command at the end of Step 4 doesn't work:
  `pyrun("from hed import _version as vr; print(f'Using HEDTOOLS version: {str(vr.get_versions())}')")`
  Module `_version` was not found, I tried `version` as well but also didn't work

This indicates that the hedtools library was not actually loaded. Did you find it on your system? Was it in the correct place for the Python that MATLAB was using?

* I tried out the example MATLAB wrapper function for HED Python tools and received error:

This also indicates that hedtools was not loaded.

Unable to resolve the name 'py.hed.tools.BidsDataset'.

Error in validateHedInBids (line 12)
    bids = py.hed.tools.BidsDataset(dataPath);

Error in testScript (line 4)
issueString = validateHedInBids(dataPath);

This also indicates that the hedtools was not properly loaded or loaded in the wrong place (that wasn't associated with the Python that was connected to MATLAB).

@VisLab
Copy link
Member

VisLab commented Jan 12, 2023

  • In Step 4, we should instruct users on how to find which pip is associated with their python.
    On MacOS, python -m pip --version will give the path to the library. which pip supposed to point to pip executable of the python environment the terminal is in

I think this might give the pip that is in the system path which is not necessarily the same as the one associated with the Python that MATLAB is using.

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

3 participants