30_python_pip.sh (850B)
1 #!/usr/bin/env bash 2 3 # pip packages 4 pkgs=( 5 bs4 6 gcalcli 7 grepg 8 haxor-news 9 howdoi 10 jupyter 11 neovim 12 numexpr 13 pandas 14 Pillow 15 protobuf 16 psutil 17 requests 18 scikit-learn 19 sympy 20 tensorflow 21 virtualenv 22 ) 23 24 for PIP in pip pip2 pip3; do 25 if [[ "$(type -P $PIP)" ]]; then 26 echo "## Installing $PIP packages" 27 for pkg in "${pkgs[@]}"; do 28 $PIP install $pkg 29 [ "$pkg" == "gcalcli" ] && gcalcli list 30 done 31 else 32 echo "## $PIP not installed" 33 fi 34 done 35 36 # tensorflow in virtualenv 37 #if [[ "$(type -P python3)" ]]; then 38 # targetdir=~/code/tensorflow 39 # mkdir -p $targetdir 40 # [ -d $targetdir/lib ] || \ 41 # virtualenv --system-site-packages -p python3 $targetdir 42 # source $targetdir/bin/activate 43 # pip3 install --upgrade tensorflow 44 #fi