I’m utterly new to Mathematica (which came already installed on my new Raspberry Pi 400), but want to install a package (.m file) I’ve downloaded from elsewhere. I find multiple places online which seem to say to use file → install …
In the Mathematica menu under ‘palettes’ I see an ‘install palette’ and that seems to work just fine – I can install a .nb file. But under ‘file’ I see no ‘install’ – nor do I see anything else that seems to be how to install a .m file.
When you see something like “file → install…” (I usually write it as File > Install…) it’s exact instructions to follow menus, starting from the left. So start with the File menu, and under there you see an “Install…” option. (The … indicates the menu item brings up a dialog). These are all generally accepted conventions for documenting use of a GUI.
Thanks Joel – but starting from the left and under the File menu is where I do not see an “Install…” option. Under Palettes there is an “Install Palette…”, but no “Install…” under File. I would attach a screen shot, but the Raspberry Pi 400 PrtScn key does not take a screenshot while the pull down is open. However after searching around a bit under the Raspberry Pi group where I entered my question I did find an earlier and similar question, to which someone answered that one should just put the .m file into the FileNameJoin[{$UserBaseDirectory, “Applications”}].directory. I did that and it does seem to do the trick – at least I can Needs[] the file now (though I’m not sure everything about it is working and I’m not sure if there might be additional things I need to do).
This is what I would do, forget about the UI in this case.
Evaluate $UserBaseDirectory in your notebook.
Using you favorite command-line or file management tool(s), place the desired .m file in the Kernel directory that should exist under $UserBaseDirectory.
Then Get (and FindFile) should see your .m file.
This is essentially what I expect that File > Install… does.