I have installed pyenv, but when I run sudo pip install xx
sudo: pip: command not found
I know that append /app/pyenv/shims:/app/pyenv/bin
(my PYENV_ROOT='/app/pyenv'
) to secure_path
and use
Defaults secure_path += /app/pyenv/shims
in /etc/sudoers.d/pyenv
,but failed with
/usr/bin/env: bash: No such file or directory
The output of echo 'echo $PATH' | sudo /bin/bash
/app/pyenv/shims
shows that secure_path just be overwritten.
so how can I append path on the original basis of secure_path in the best way?