Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nermal

Moderator
Original poster
Staff member
Dec 7, 2002
20,982
4,546
New Zealand
I was messing around earlier, trying to install Stable Diffusion on my machine, and it seems that I did something a bit "wider ranging" than I expected/intended.

When I launch Terminal, it now starts up Python and does something with it before giving me the usual zsh prompt. When I open a new Terminal window it displays "python" in the title bar for about half a second, then switches to displaying "zsh". Additionally my zsh prompt now has "(base)" in front of it:

Last login: Wed Sep 14 15:41:05 on ttys001
(base) nermal@Nermals-iMac ~ %

I'm not all that familiar with the internal workings of zsh, but it appears that this might be due to some stuff inside my ~/.zshrc:

Code:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/nermal/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/nermal/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/nermal/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/nermal/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

Is it "safe" to remove this file? Or maybe rename it, so I can run it when I need to rather than having it run every time? I just don't want to break things further by diving in without checking :)
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,246
4,936
Don't want to delete .zshrc, as that drives other things (potentially).

To be safe, comment the code out. And maybe what's just above it (the return status check implies something Anaconda related is just above the snippet of code).

Then see if Stable Diffusion still works. If not, might just need to put the "export PATH" line outside the snippet block.

Looks like some overkill (maybe) going on by installing a full-blown IDE environment vs a basic runtime environment that SD needs. Like Java these days, need to install SDK in most cases. And 99% of the time, Average Joe will not be opening a terminal in any environment, so won't notice something changed.

Found this while typing this. Sounds like can comment out, as assuming OP is not doing any Python coding via Anaconda.

 
  • Like
Reactions: Nermal

Nermal

Moderator
Original poster
Staff member
Dec 7, 2002
20,982
4,546
New Zealand
The listing I posted above is the complete content of the file, so no worries there. I'll just rename it and see whether SD breaks.

The installation instructions I used were... not the best (it was difficult to find some that worked). I have no idea whether Miniconda is only required for installation or whether you need it to run SD too. Sounds like it's easy enough to test though :)
 
  • Like
Reactions: NoBoMac

Nermal

Moderator
Original poster
Staff member
Dec 7, 2002
20,982
4,546
New Zealand
I have no idea whether Miniconda is only required for installation or whether you need it to run SD too.
And we shall never know... because SD has decided to break itself even before I touched anything. Unless anyone knows what could cause "ModuleNotFoundError: No module named 'torch'"?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.