Pip ran in Conda Env question

Can I safely downgrade using pip in a conda environment without effecting anything outside of the conda environment?

I have code that is written for Tensorflow 0.12 and not 1 and would like to downgrade, but I cannot do so if it will mess up other conda environments. I understand that if I install with “conda install …” it will be safe, but what about “pip install”?

I think it should be fine. You can make sure by typing

which pip

in your environment. It should point to a path like /path/to/anacondaX/envs/myenv/bin/pip

1 Like

I have been using pip install commands in my conda environments.

Till now there have been no issues.

Since all packages are downloaded in separate folders corresponding to environments , this should be fine.

1 Like

@fastai, when I do such things I like to clone the current environment and do the upgrade in the cloned one. This way I don’t mess up my productive environment (painful experiences in the past). This is done like so:

conda create --name clone_name --clone productive_env_name

Then you can test safely and if it works just switch to the new environment,

More info here:
Managing Anaconda Envs

1 Like

Thank you @z0k , @jagatsingh, and @iNLyze! This resolved my misunderstanding.

I confirmed that pip fixed the issue and was local to the conda env only. And it worked. The conda env cloning was helpful too - I will make sure to do that in the future.

1 Like