Skip to content

Instantly share code, notes, and snippets.

@ekreutz
Last active April 16, 2026 19:05
Show Gist options
  • Select an option

  • Save ekreutz/995bb95e428358b9efa2b2f80b02143c to your computer and use it in GitHub Desktop.

Select an option

Save ekreutz/995bb95e428358b9efa2b2f80b02143c 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 :)

@bentaculum

Copy link
Copy Markdown

Nice fix, thank you!

@javimontero

Copy link
Copy Markdown

Cool

@kalinlau

Copy link
Copy Markdown

nice fix, thx

@woml

woml commented Mar 12, 2022

Copy link
Copy Markdown

Cool! It's helpful.

@MProuts

MProuts commented Sep 29, 2022

Copy link
Copy Markdown

thx

ghost commented Jun 15, 2023

Copy link
Copy Markdown

Thx! :)

@taesiri

taesiri commented Oct 27, 2023

Copy link
Copy Markdown

Thank you!

@GeoffreyBrunet

Copy link
Copy Markdown

Any idea for resolve this problem using Fish shell please ?

@davidgao7

Copy link
Copy Markdown

Thank you!

@GUYYYUG

GUYYYUG commented Oct 21, 2025

Copy link
Copy Markdown

Very nice! Thank you!

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