Conda env activation: Weird "must be sourced" error
<p>I am trying to run the following:</p>

<pre><code>source activate env-name
</code></pre>

<p>But I am receiving an error that tells me that the call to <code>activate</code> must be sourced. In the Conda <code>activate</code> script, there's an if block near the beginning that tests <code>"$(basename "$0")"</code>, specifically whether it's equal to <code>activate</code>, in which case it will raise the exception I'm referring to. A little bit of fiddling with the script (i.e., <code>echo $0; return 1</code>) and I found out that it does indeed think that the 0th argument that I am passing in is <code>activate</code> rather than <code>source</code>. This is perplexing because I know that my command includes <code>source</code> in it and that that should be the 0th argument. I'm not sure what else there is to do. Does anybody have any clues?</p>

<p>In case it's important, I am using zsh as my default shell and it seems that the <code>activate</code> script is a bash script, but I don't think that should matter (it doesn't elsewhere for me, only in this specific environment on my work laptop). I am able to get around this whole thing by just commenting out the whole check (and a couple of other minor changes), but I'd rather not have to do that in this particular case.</p>