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

bijtis

macrumors newbie
Original poster
Jan 22, 2016
17
4
Hey all,

I recently upgraded to Catalina. After realising it had broken my Anaconda installation, I began looking into the changes Catalina had made. After some reading I decided to switch to zsh and iTerm.

Since doing so I've had some trouble with the configuration. When I install packages with brew, I can't run them from zsh - I just get a "command not found" message.

I think the problem is my path variable in .zshrc, but I don't really understand what directories I'm supposed to be pointing to. It seems to cause problems with a Python packages too.

Can anyone help me out?
 

CarbonCycles

macrumors regular
May 15, 2014
122
118
this worked for me


export PATH="opt/anaconda3/bin":$PATH
conda update conda
conda init zsh

Can I ask what your installation process was? I currently have a new 16", and I tried to download and install Anaconda last night. Using their package installer failed to find Conda, which I believe is part of the new security protocols they're now using.

Looking through their documents online, it seems to be a pretty mixed bag.
 

HenryAZ

macrumors 6502a
Jan 9, 2010
690
143
South Congress AZ
I found when using zsh in Catalina, almost all of my former bash setup parameters, found in [dot]bash_profile, transferred seamlessly and worked in [dot]zshrc. The only one that did not was the PATH variable statement. I researched and got many different answers, some off point, and finally found the one that works. If you need to add additional folders to your PATH environment variable, the syntax is:
Code:
path+=/Users/henry/bin
or whatever your particular paths are you need to add. The "path+" is the key.
 

RainingDay

macrumors newbie
Apr 16, 2020
1
0
Taiwan
Hi @bijtis:

Your problem is easy to solve:
1. Find the bin/ folder of your anaconda:
 At Application/ folder, right click the app and select "Show Package Content", try to find the bin/ folder yourself.
2. Move a file to /etc/paths.d/:
 2.1 Create a file at the place you have write permission, with the content of the path of the bin/ folder you find.
  (e.g. /Applications/Visual Studio Code.app/Contents/Resources/app/bin/)
 2.2 Move that file to /etc/paths.d/

The naming convention of the file at step 2.1 is: priority-id, e.g. 87-vscode.

The advantage of this method:
1. It doesn't involve the zsh-thing. (i.e. ~/.zshenv, ~/.zshrc, ~/.zprofile), require no programming background.
2. When you remove the app, just delete the file at /etc/paths.d/

Hope this help.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.