Skip to content Skip to sidebar Skip to footer

How To Use Pyenv With Another User?

How to use pyenv with another user? For example, If I have installed pyenv in user test's environment, I could use pyenv when i login as test. However, how could i use pyenv whe

Solution 1:

Even if you did this, I'd strongly discourage it. Root can access pretty much everyone's home directory, but the nuances of adding programs to the PATH that the root user doesn't technically own can be detrimental at best - might lead to a few root services not working properly, and actively insecure at worst.

There's literally nothing wrong with installing your own copy of pyenv as another user. There's no pain involved and there's not much sense to do it any other way.

Solution 2:

If you are on a Mac I'd strongly discourage trying to follow the above advice. Trying to install a personal copy of pyenv using homebrew won't work. What you can do is to set

export PYENV_ROOT=~/.pyenv

in your ~/.bashrc so that your pyenv data is local, even if pyenv itself is shared. You will need to install your own copies of every python version you want, but fortunately disk space is cheap.

Post a Comment for "How To Use Pyenv With Another User?"