From 89e10f8cdf442f838b2fcc7cba6e459ec38ff3b6 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 3 Mar 2018 12:15:23 -0600 Subject: [PATCH] .bashrc: Add `pip --user` bin directories to $PATH --- .bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bashrc b/.bashrc index 77d8178..4696141 100644 --- a/.bashrc +++ b/.bashrc @@ -105,6 +105,14 @@ if [ -d "/native" ]; then manpath_end="$manpath_end:/native/usr/share/man" fi +# python pip --user +for python in "python" "python2" "python3"; do + if [ -n "$(type -P $python)" ]; then + pybin="$($python -m site --user-base)/bin" + test -d "$pybin" && path_end="$path_end:$pybin" + fi +done +unset python pybin PATH="$path_start:$PATH:$path_end" MANPATH="$manpath_start:$MANPATH:$manpath_end" -- 2.47.1