[Date Index] [Thread Index] [Author Index]
Re: Where do I put my own add-on packages?
On 22/4/06 10:00, in article e2crai$k1c$1 at smc.vnet.net, "Bill Rowe" <readnewsciv at earthlink.net> wrote: > On 4/21/06 at 1:33 AM, J.A.Solomon at city.ac.uk (Solomon, Joshua) > wrote: > >> I suggest that you create a folder in your home directory called >> Mathematica. Then, in the applications folder, ctrl-click the >> Mathematica icon and select Show Package Contents. You'll see five >> more folders. Open Configuration, then Kernel, then init.m. Add >> SetDirectory["Mathematica"]; $Path=Append[$Path,"Mathematica"]; >> at the bottom of the cell and Save. That's the way I do it. > > This will work. But it has a significant disadvantage in that this method > greatly complicates upgrading Mathematica to a new version. If you fail to > recall or determine what modifications you've made, they get wiped when > copying the new version over. No. Upgrading wipes nothing. Of course, SetDirectory["Mathematica"]; $Path=Append[$Path,"Mathematica"]; will need to be added to the new init.m file. > A way to resolve this is to set up folders in the folder returned by executing > > $UserBaseDirectory > > Any packages installed there will not get overwritten when upgrading to a new > version. In OS X, the default $UserBaseDirectory is a subdirectory of the user's home directory, i.e. if the username is Josh, then the default $UserBaseDirectory is /Users/Josh/Library/Mathematica. I never put any valuable data in the Library folder because the system and other applications put files in there that have really long names with strange characters that cannot be copied/backed-up on any system not running OS X. js -- Joshua A. Solomon http://www.staff.city.ac.uk/~solomon