Skip to content

Instantly share code, notes, and snippets.

@scottstanfield
Forked from ekreutz/tmux_conda_fix.md
Created January 12, 2020 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottstanfield/f82a344f42df3f4b068e8c0e3554d569 to your computer and use it in GitHub Desktop.
Save scottstanfield/f82a344f42df3f4b068e8c0e3554d569 to your computer and use it in GitHub Desktop.
Fix tmux messing with conda path

Fix tmux messing with conda

Problem: When running a conda environment and opening tmux on macOS, a utility called path_helper is run again. Essentially, the shell is initialized twice which messes up the ${PATH} so that the wrong Python version shows up within tmux.

Solution

If using bash, edit /etc/profile and add one line. (For zsh, edit /etc/zprofile)

...
if [ -x /usr/libexec/path_helper ]; then
        PATH="" # <- ADD THIS LINE (right before path_helper call)
        eval `/usr/libexec/path_helper -s`
fi
...

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment