Permalink
Browse files

Add bootstrap-pyenv script

  • Loading branch information...
crwood committed Jan 8, 2019
1 parent 72e3746 commit d01e73898ad1c601a07c0e3306b8718daa4e377a
Showing with 22 additions and 0 deletions.
  1. +22 −0 misc/bootstrap-pyenv.sh
@@ -0,0 +1,22 @@
#!/bin/sh

# Debian/Ubuntu
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev git

# Fedora 22+
#sudo dnf install -y make gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz git

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
exec "$SHELL"

env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.15
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.6
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.8
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.2

pyenv rehash
pyenv global 2.7.15 3.6.8 3.5.6 3.7.2

0 comments on commit d01e738

Please sign in to comment.