2

I'm on macOS and in the past, I must have set a permanent conda environment, such that every time I open a new shell in the terminal, the conda environment is automatically activated and at the prompt and I have to constantly run conda deactivate. I want to permanently stop this behavior. I tried conda env remove -n ENV_NAME as recommended on this thread but this doesn't work. It keeps returning: CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again even though I've deactivated before running this.

I would simply just like to log in to the terminal without this conda environment being automatically activated. It can still live on somewhere in my system, I just want to remove it from turning up by default.

EDIT. NEW ISSUES: As mentioned in comments, as based on recommendation to check out the suggested question, I did this, and it has caused new issues so it may be that those are out of date answers or just don't solve my case sufficiently. These issues are: Re. conda config --set auto_activate_base false mentioned in first answer in linked-to question. I ran this command but get this message in the terminal when I open a new session: Conda. Command not found. N/A: version "N/A -> N/A" is not yet installed. You need to run "nvm install N/A" to install it before using it.
This has also completely changed my shell prompt. I got a ? in the title of the shell open previous to running this command, and hostname changed to some random hotspot user as my location - before my username. So it's worse than before actually.

I've gone into .zshrc and .bashrc and only .zshrc had the conda commands. I deleted all of the conda stuff from .zshrc. The .bashrc doesn't have any conda stuff. Are there any other shell files like these that may exist?

EDIT 2: Problem of side effect issue with conda not found error is now resolved. conda activate command was in my .bashprofile. Didn't remember putting it there as I did it blindly a year ago whilst following a tutorial! Thanks for the help everyone.

timman
  • 479
  • 5
  • 14
  • 1
    It's probably in your `.bashrc` or `.zshrc` – ti7 Apr 12 '21 at 20:42
  • have you tried this [link](https://stackoverflow.com/questions/54429210/how-do-i-prevent-conda-from-activating-the-base-environment-by-default) – Jean Camargo Apr 12 '21 at 20:42
  • Does this answer your question? [How do I prevent Conda from activating the base environment by default?](https://stackoverflow.com/questions/54429210/how-do-i-prevent-conda-from-activating-the-base-environment-by-default) – merv Apr 12 '21 at 20:42
  • Re. conda config --set auto_activate_base false I've just run this command given in first answer there but get this message in terminal every time: N/A: version "N/A -> N/A" is not yet installed. You need to run "nvm install N/A" to install it before using it. – timman Apr 12 '21 at 21:03
  • This has also completely changed my shell prompt. I'm getting a ? in the title of the shell open previous to running this command, and the hotspot address as my location before my username. It's worse than before. Any idea why hotspot address is now showing? – timman Apr 12 '21 at 21:05
  • I solved the side effect issue: there was a conda activate command inside ~/.bash_profile. I didn't know about the existence of these - I'll update this to the other questions relating to conda command not found error message. Now it's all good apart from hostname issue :) thanks to all – timman Apr 12 '21 at 22:40

0 Answers0