I imagine this question has been asked before but I couldn’t find a solution; forgive me if this is a duplicate.
My issue is that pip is installing all packages in the base environment even when I’m in a virtual environment that I created with conda create. My understanding is this is not expected/desired behavior… the package installation should be in the env that I’m currently in.
I think the description below is a related to the problem I described above (based on the answer here: python - Where to install pip packages inside my Conda environment? - Stack Overflow) but this stack overflow post doesn’t offer a solution to the problem.
When I run the below command in a my env tweets
, it correctly says I’m in that env
$ echo $CONDA_PREFIX
/usr/local/anaconda3/envs/tweets
But when I ask which pip
while in the tweets
env I get the following:
$ which pip
/usr/local/anaconda3/bin/pip
^^ which I think indicates that all packages would be installed in the base env
Based on the stack overflow above I would expect which pip
to return:
/usr/local/anaconda3/envs/tweets/bin/pip
Hopefully this all makes sense and someone can help me figure out how to get packages installed into my virtual envs rather than the base. Thanks in advance!