0

Not remotely a power user at all, I got stumped when my shell (which has been working just fine for months) started giving me this output:

Last login: Tue Feb  5 08:26:33 on ttys002
Welcome to fish, the friendly interactive shell
pacoc@iPaco ~> source ~/miniconda3/bin/activate
~/miniconda3/bin/activate (line 5): 'return' outside of function definition
\. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
                                            ^
from sourcing file ~/miniconda3/bin/activate
    called on standard input

source: Error while reading file '/Users/pacoc/miniconda3/bin/activate'
pacoc@iPaco ~>

This is an iMac running MacOS 10.14.2; I have searched across the site but couldn't find a similar question.

Help appreciated. Thanks

  • That activate script is for a bash (i.e., POSIX) shell. Fish isn't a POSIX compliant shell hence the syntax error. You've changed something. Did you upgrade fish recently. Fish 3.0 was recently released and has a few backward incompatible changes that might break miniconda or otherwise confuse it. Alternatively, perhaps you upgraded miniconda and failed to set it up correctly for fish. I use Anaconda with fish but use a custom activate script that I wrote and it works fine. – Kurtis Rader Feb 5 at 20:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.