在linux脚本中,激活anaconda环境,source activate env,提示source: activate: file not found,解决方案

需求:在shell脚本中激活conda虚拟环境

NOTE: 直接使用conda activate envName会报错,所以一般使用source activate envName

**在linux脚本中,激活anaconda环境,

source activate env

提示source: activate: file not found,

startEnv.sh: line 2: source: activate: file not found

解决方案: 以文件找到activate ,去激活

source /home/speed/anaconda3/bin/activate ensName

你可能感兴趣的:(python学习记录,linux,python)