TransWikia.com

Running the wolframscript on linux then it returns permission denied

Mathematica Asked on July 16, 2021

I use the script from mathematica’s tutorial

#!/usr/bin/env wolframscript

(* generate "num" samples of a mixed distribution *) 
num  = ToExpression[$ScriptCommandLine[[2]]];
Print /@ RandomVariate[
  MixtureDistribution[ 
    {1, 2},
    {NormalDistribution[1, 0.2],
     NormalDistribution[3, 0.1]}
  ], num,  WorkingPrecision -> 50]

then save this script as file.wls, and make the script executable

chmod a+x file.wls

but when run the script ./file.wls 10 , it returns

-bash: ./file.wls: /usr/bin/env: bad interpreter: Permission denied

so what’s happening there? is this problem due to my computer?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP