dev/+pyenv: install latest pythons and essential packages
This commit is contained in:
parent
391fca5888
commit
948abc2d43
|
@ -1,7 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -d "$HOME/.pyenv" ]]; then
|
||||
>&2 echo "~/.pyenv already exists, can't install."
|
||||
else
|
||||
if [[ ! -d "$HOME/.pyenv" || $FORCE ]]; then
|
||||
git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
|
||||
|
||||
# Install the latest v2 and v3 versions of python
|
||||
source "$(cd $(dirname $0) && pwd)"/env.zsh
|
||||
py2=$(pyenv install --list | sed 's/^ //' | grep -e '^3' | grep --invert-match 'dev\|a\|b' | tail -1)
|
||||
py3=$(pyenv install --list | sed 's/^ //' | grep -e '^2' | grep --invert-match 'dev\|a\|b' | tail -1)
|
||||
pyenv install "$py2"
|
||||
pyenv install "$py3"
|
||||
pyenv global "$py3" "$py2"
|
||||
|
||||
# Install global packages
|
||||
for pip in pip2 pip3; do
|
||||
$pip install --upgrade pip
|
||||
$pip install ipython setuptools numpy matplotlib PyQT5
|
||||
done
|
||||
|
||||
# Install packages needed for dotfile scripts
|
||||
pip3 install totp pytz tzlocal
|
||||
else
|
||||
>&2 echo "~/.pyenv already exists, can't install."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue