0

I have recently installed PIPX on MAC running Big Sur and ZSH shell. During the install it prompted for the following to be added to the .zshrc file....

# Created by `pipx` on 2021-03-20 14:22:23
export PATH="$PATH:/Users/xxxx/.local/bin"

eval "$(register-python-argcomplete pipx)"

Running echo $PATH showed /Users/xxxx/.local/bin added to the end of my PATH variable. However, when I close the terminal and open up a new session, running echo $PATH now shows the location duplicated at the end of the PATH :/Users/xxxx/.local/bin:/Users/xxxx/.local/bin

Opening and closing new terminal sessions doesn't seem to create any more additions to PATH it just remains at these 2 entries....

I have run typeset -U PATH path to remove the duplicate but each time I open up new terminal sessions it just duplicates again.

Does anybody know how I can stop this from happening.....I would really like to keep my PATH variable as clean as possible.

KB_cov
  • 3
  • 1
  • 3

1 Answers1

1

Add the following path to your .zshrc file :

export PATH="${PATH}:$(python3 -c 'import site; print(site.USER_BASE)')/bin"

Reference: [command not found: pipx]: https://github.com/pipxproject/pipx/issues/283

FriendsA
  • 11
  • 1