condaminiconda

How to change what happens when a miniconda environment is activated?


I installed miniconda on a redhat linux machine. I have done this with success once before, but this time I'm going to need to use the r library ROracle, so I went about installing an oracle client into miniconda. Running into issues, I deleted the files and instead I installed it in a directory under /usr/lib. But every time I now run the activate command ("conda activate" as I'm just using the default/base environment), it tries to download the oracle instant client, using the same URL I previously used in a wget command. I thought this was really strange and nowhere did I save this URL into a file. I'm trying to figure out how to stop it from doing this. I searched within all the files and I don't see this URL anywhere. I figured it was in some sort of start up file.

Image of activating conda environment and it trying to download an oracle instant client


Solution

  • To fix my issue, looks like it's running files found in miniconda3/etc/conda/activate.d.There is a file there called oracle-instant-client_activate.sh, which checks for the instant client folder and if it doesn't see it, it downloads the instant client from Oracle's website. I deleted this file and now my problem is gone. There were lots of other files in this directory, too, including env_var.sh, where I decided to set some environment variables.