Re: Where do I put my own add-on packages?
- To: mathgroup at smc.vnet.net
- Subject: [mg65921] Re: Where do I put my own add-on packages?
- From: "Solomon, Joshua" <J.A.Solomon at city.ac.uk>
- Date: Sun, 23 Apr 2006 06:17:37 -0400 (EDT)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
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