Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9223

Re: Trouble with MathKernel

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Trouble with MathKernel
Date 2012-03-25 05:17 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jkm9pt$bvb$1@smc.vnet.net> (permalink)
References <201203240701.CAA04127@smc.vnet.net>

Show all headers | View raw


I'm going to assume the setup was the same with Mathematica 7 as for 
Mathematica 8: the kernel executable is hidden inside the Mac package 
/Applications/Mathematica.app.

If you right-click (or Ctrl-click) on that item in Finder, select Show 
Package Contents. In the new Finder window that opens, look at

   Contents/MacOS/MathKernel

That's the executable you actually want. So, for example, if you type in 
a Terminal command line:

   /Applications/Mathematica.app/Contents/MacOS/MathKernel

then you'll get an interactive command-line session. And if you have a 
file batch.m of legitimate Mathematica expressions, then the following 
_will_ work:

   /Applications/Mathematica.app/Contents/MacOS/MathKernel <batch.m 
 >batch.out

(assuming your current directory is the location of batch.m, of course).

Now just either add 
/Applications/Mathematica.app/Contents/MacOS/MathKernel to your PATH or 
make an alias for it in the directory where you're working (or some such 
thing).


On 3/24/12 3:01 AM, Cisco Lane wrote:
> I'm running Mathematica Home edition v. 7 on a Mac Intel Core 2 Duo.
>
> I'm trying to run a notebook in the background. I have saved the notebook as a package (batch.m) but, in a terminal, when I type:
>
> MathKernel<  batch.m>  batch.out
>
> the batch.out file says "MathKernel: no such file or directory". Same thing happens if I substitute "math" for "MathKernel".
>
> Any help would be appreciated.
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Trouble with MathKernel Murray Eisenberg <murray@math.umass.edu> - 2012-03-25 05:17 +0000

csiph-web