How to use pyenv with another user?

<h2>How to use pyenv with another user?</h2>

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?


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 <em>technically</em> own can be detrimental at best - might lead to a few root services not working properly, and actively insecure at worst.

There's <em>literally</em> 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.


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.



  • Exact-match, case-insensitive match without normalization in Elasticsearch 6.2
  • Use element-resize-detector library in an Angular2 application
  • How to add JButton on JScrollPane?
  • $http.get of json file always returns 404
  • Add and extract struct from NSMutableArray [duplicate]
  • How to create temporary files on linux that will automatically clean up after themselves no matter w
  • Programmatically reading a Microsoft Word document
  • Padding time-series subsequences for LSTM-RNN training
  • Bash test if an argument exists
  • Linq memory question
  • ASP.NET application developed in 32 bit environment not working in 64 bit environment
  • Steps to run node http server in visual studio code
  • JMESPath descend in tree for filter
  • PHP Change XML node values
  • Manifest marge error after migrating to androidX
  • Parallel exact matrix diagonalization with Python
  • Is js executed after form synchronized submit
  • Reading large text file very slow
  • Moving Circle on Live Wallpaper
  • Xamarin.Forms: How To Populate A Pie Chart From Web API Data?
  • Using one probability set to generate another [duplicate]
  • Using PHP & Tornado
  • apache zeppelin is started but there is connection error in localhost:8080
  • Getting specific color for specific value using JSON data
  • Why clearfsimport command adds file to source control with a size zero?
  • Move elements from a listbox to another
  • ROR + MVC Disable Browser Cache
  • create circular Auto Horizontal Scroll View?
  • How does the dispatcher work when mixing sync/async with serial/concurrent queue?
  • Javascript inside HTML import not affecting imported HTML
  • C# code can't “see” the methods in my C++ dll
  • Julia 1.0 UndefVarError - Scope of Variable
  • Copy and paste data from multiple workbooks to a worksheet in another Workbook
  • time column in sqlite using gorm
  • How to merge objects within array based on attribute
  • Create an average of multiple excel chart without the data source
  • how to get the location(lat/lng) on google maps v3 from the location(x,y)