Is running
conda activate -n myenv
pip install mypackage
equivalent to running
/opt/anaconda3/envs/myenv/bin/pip install mypackage
?
Yes, they are effectively the same because Conda environment activation prepends the environment's bin/
directory to PATH and therefore the former will evaluate to the latter.
However, it may be noted that were some non-standard manipulation of PATH or pip-relevant environment variables carried out by activation scripts then there could be a difference. But this is only a note about possibilities, not something encountered in typical use.