conda activate py3_torch
Activating the conda env using conda activate py3_torch, I get the following error when trying to use pip:
OSError: [Errno 30] Read-only file system: '[...]/centos7/Core/Anaconda/5.0.1-fasrc02/x/lib/python2.7/site-packages/pi'
However, I can use pip when adding the --user argument.
source activate py3_torch
Activating the conda env using source activate py3_torch, I do not have any issues with pip, i.e., I can run it without --user.
Curiously, the error above references python2.7 although I created the env via conda create -y -n py3_torch python=3.8.
According to this Stackoverflow answer - to a more generic version of my question - the behavioral difference between source activate and conda activate should only be minor. Although the referenced docs (from 2017) seem to hint that it may have to do with path collisions
The conda activate command also has advantages of (1) being universal across all OSes, shells, and platforms, and (2) not having path collisions with scripts from other packages like python virtualenv’s activate script.