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://git@stash.devlan.net:7999/opensource/pyenv.git ~/.pyenv -
Define environment variable
PYENV_ROOT
to point to the path where pyenv repo is cloned and add$PYENV_ROOT/bin
to your$PATH
for access to thepyenv
command-line utility.$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile~/.zshenv
file instead of~/.bash_profile
.
Ubuntu note: Modify your~/.bashrc
file instead of~/.bash_profile
.
-
Add
pyenv init
to your shell to enable shims and autocompletion. Please make sureeval "$(pyenv init -)"
is placed toward the end of shell configuration file since it manipulatesPATH
during the initialization.$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profileZsh note: Modify your
~/.zshenv
file instead of~/.bash_profile
.
Ubuntu note: Modify your~/.bashrc
file instead of~/.bash_profile
.
General warning: There are some systems, where theBASH_ENV
variable 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 aspyenv
getting 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)