MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Where do I put my own add-on packages?

  • To: mathgroup at
  • Subject: [mg65941] Re: Where do I put my own add-on packages?
  • From: Bill Rowe <readnewsciv at>
  • Date: Mon, 24 Apr 2006 06:01:51 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 4/23/06 at 6:17 AM, J.A.Solomon at (Solomon, Joshua)

>On 22/4/06 10:00, in article e2crai$k1c$1 at, "Bill Rowe"
><readnewsciv at> wrote:

>>On 4/21/06 at 1:33 AM, J.A.Solomon at (Solomon, Joshua)

>>>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.

The directory you suggested above is within the Mathematica package. The usual way of installing a new version in OS X is to drag new Mathematica package to the Applications directory in finder. This replaces the entire Mathematica package that previously existed, overwriting any modifications you made to that directory.

Now it is entirely possible to avoid overwritting modifications you have made. But this means a more complicated installation for the upgrade than typical.

>>A way to resolve this is to set up folders in the folder returned
>>by executing


>>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. 

This is correct.

>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.

This is a illogical reason for avoiding putting files in ~/Library. In fact, all applications running under OS X should put thier support files in ~/Library/Application Support a directory specifically intended for application support files.

And there is no more difficulty backing up this directory than any other directory in the user's home directory.
To reply via email subtract one hundred and four

  • Prev by Date: Re: How to extract functions from a list and call them with any argument?
  • Next by Date: Re: matrix operations -- shared data vs copied
  • Previous by thread: Re: Where do I put my own add-on packages?
  • Next by thread: Re: Where do I put my own add-on packages?