简体   繁体   中英

Stata command not found in batch mode

I'm trying to run a Stata.do file in batch mode according to the instructions here .

However, Stata -b testdo.do yields:

zsh: command not found: Stata

Replacing Stata with StataMP yields similar results.

My suspicion is that this is a path issue, but my .zshrc file includes the line:

export PATH=$PATH/Applications/Stata/StataMP.app/Contents/MacOS/

and echo $PATH confirms that the path to Stata is indeed in the $PATH variable:

echo $PATH
/Users/arthurmorris/anaconda3/bin:/Users/arthurmorris/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin/Applications/Stata/StataMP.app/Contents/MacOS

My issue appears to be distinct from: Stata command line arguments in batch mode

I'm using Stata MP 16, in macOS Catalina 10.15.5.

The export statement was missing : and thus the portion of $PATH that pointed to Stata was not properly delimited from the other entries in $PATH .

export PATH=$PATH:/Applications/Stata/StataMP.app/Contents/MacOS/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM