This is a configuration repository for Bo-Run's dotfiles using GNU Stow.
Install GNU Stow:
-
With homebrew:
brew install stow
Installing Zim is easy:
-
With curl:
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
-
With wget:
wget -nv -O - https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
This will get you going with the latest version of pyenv and make it easy to fork and contribute any changes back upstream.
-
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 https://github.com/pyenv/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
- Zsh note: Modify your
~/.zshrc
file instead of~/.bash_profile
. - Ubuntu and Fedora note: Modify your
~/.bashrc
file instead of~/.bash_profile
. - Proxy note: If you use a proxy, export
http_proxy
andHTTPS_PROXY
too.
- Zsh note: Modify your
-
Add
pyenv init
to your shell to enable shims and autocompletion. Please make sureeval "$(pyenv init -)"
is placed toward the end of the shell configuration file since it manipulatesPATH
during the initialization.$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
- Zsh note: Modify your
~/.zshrc
file instead of~/.bash_profile
. - fish note: Use
pyenv init - | source
instead ofeval (pyenv init -)
. - Ubuntu and Fedora note: Modify your
~/.bashrc
file instead of~/.bash_profile
.
General warning: There are some systems where the
BASH_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. See #264 for details. - Zsh note: Modify your
-
Restart your shell so the path changes take effect. You can now begin using pyenv.
$ exec "$SHELL"
-
Install Python build dependencies before attempting to install a new Python version. The pyenv wiki provides suggested installation packages and commands for various operating systems.
-
Install Python versions into
$(pyenv root)/versions
. For example, to download and install Python 2.7.8, run:$ pyenv install 2.7.8
NOTE: If you need to pass configure option to build, please use
CONFIGURE_OPTS
environment variable.NOTE: If you want to use proxy to download, please use
http_proxy
andhttps_proxy
environment variable.NOTE: If you are having trouble installing a python version, please visit the wiki page about Common Build Problems
If you've installed pyenv using the instructions above, you can upgrade your installation at any time using git.
To upgrade to the latest development version of pyenv, use git pull
:
$ cd $(pyenv root)
$ git pull
To upgrade to a specific release of pyenv, check out the corresponding tag:
$ cd $(pyenv root)
$ git fetch
$ git tag
v0.1.0
$ git checkout v0.1.0
The simplicity of pyenv makes it easy to temporarily disable it, or uninstall from the system.
- To disable pyenv managing your Python versions, simply remove the
pyenv init
line from your shell startup configuration. This will remove pyenv shims directory from PATH, and future invocations likepython
will execute the system Python version, as before pyenv.
pyenv
will still be accessible on the command line, but your Python
apps won't be affected by version switching.
-
To completely uninstall pyenv, perform step (1) and then remove its root directory. This will delete all Python versions that were installed under
$(pyenv root)/versions/
directory:rm -rf $(pyenv root)
If you've installed pyenv using a package manager, as a final step perform the pyenv package removal. For instance, for Homebrew:
brew uninstall pyenv
This will install the latest development version of pyenv-virtualenv into
the $(pyenv root)/plugins/pyenv-virtualenv
directory.
Important note: If you installed pyenv into a non-standard directory, make sure that you clone this repo into the 'plugins' directory of wherever you installed into.
From inside that directory you can:
- Check out a specific release tag.
- Get the latest development release by running
git pull
to download the latest changes.
-
Check out pyenv-virtualenv into plugin directory
$ git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
-
(OPTIONAL) Add
pyenv virtualenv-init
to your shell to enable auto-activation of virtualenvs. This is entirely optional but pretty useful. See "Activate virtualenv" below.$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
Fish shell note: Add this to your
~/.config/fish/config.fish
status --is-interactive; and pyenv init - | source status --is-interactive; and pyenv virtualenv-init - | source
Zsh note: Modify your
~/.zshenv
file instead of~/.bash_profile
.Pyenv note: You may also need to add
eval "$(pyenv init -)"
to your profile if you haven't done so already. -
Restart your shell to enable pyenv-virtualenv
$ exec "$SHELL"
This software is hereby released into the public domain. That means you can do
whatever you want with it without restriction. See LICENSE.md
for details.