Vault7: CIA Hacking Tools Revealed
Navigation: » Latest version
Owner: User #71475
Using pyenv on devlan
Pyenv is a fantastic tool for managing and working with different versions of Python on a single machine.
('toc' missing)
Setting Up Pyenv for the First Time
-
Check out pyenv where you want it installed. A good place to choose is
$HOME/.pyenv(but you can install it somewhere else).$ git clone ssh://[email protected]:7999/opensource/pyenv.git ~/.pyenv -
Define environment variable
PYENV_ROOTto point to the path where pyenv repo is cloned and add$PYENV_ROOT/binto your$PATHfor access to thepyenvcommand-line utility.$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
Zsh note: Modify your~/.zshenvfile instead of~/.bash_profile.
Ubuntu note: Modify your~/.bashrcfile instead of~/.bash_profile.
-
Add
pyenv initto your shell to enable shims and autocompletion. Please make sureeval "$(pyenv init -)"is placed toward the end of shell configuration file since it manipulatesPATHduring the initialization.$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profileZsh note: Modify your
~/.zshenvfile instead of~/.bash_profile.
Ubuntu note: Modify your~/.bashrcfile instead of~/.bash_profile.
General warning: There are some systems, where theBASH_ENVvariable is configured to point to.bashrc. On such systems you should almost certainly put the above-mentioned lineeval "$(pyenv init -)into.bash_profile, and not into.bashrc. Otherwise you may observe strange behaviour, such aspyenvgetting into an infinite loop. -
Restart your shell so the path changes take effect. You can now begin using pyenv.$ exec $SHELL
Related articles
('contentbylabel' missing)
('details' missing)