在批处理模式下找不到Stata命令 [英] Stata command not found in batch mode
问题描述
我正在尝试根据但是,Stata -b testdo.do
会产生:
zsh: command not found: Stata
用StataMP
替换Stata
会得到相似的结果.
Replacing Stata
with StataMP
yields similar results.
我怀疑这是路径问题,但是我的.zshrc
文件包含以下行:
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/
和echo $PATH
确认到Stata的路径确实在$PATH
变量中:
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
我的问题似乎与以下问题不同: Stata命令行参数处于批处理模式
My issue appears to be distinct from: Stata command line arguments in batch mode
我正在macOS Catalina 10.15.5中使用Stata MP 16.
I'm using Stata MP 16, in macOS Catalina 10.15.5.
推荐答案
导出语句缺少:
,因此$PATH
指向Stata的部分未与$PATH
中的其他条目正确分隔.
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/
这篇关于在批处理模式下找不到Stata命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!