Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use pyenv with another user?

Tags:

python

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 when I login as another user, such as root?

like image 499
dae Avatar asked Sep 28 '22 23:09

dae


1 Answers

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.

like image 144
Makoto Avatar answered Oct 07 '22 19:10

Makoto