Skip to content

Instantly share code, notes, and snippets.

@point-source
Last active October 27, 2020 23:30
Show Gist options
  • Save point-source/b2a9224bf7913f716f40476aebfb0cc3 to your computer and use it in GitHub Desktop.
Save point-source/b2a9224bf7913f716f40476aebfb0cc3 to your computer and use it in GitHub Desktop.
Set up development environment for python on PopOS
# Note: This is just my personal setup. This may or may not work for you / your system
# Install fish (A better shell)
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt-get update
sudo apt-get install fish
# Set fish as default login shell
# See here for additional options: https://gist.github.com/idleberg/9c7aaa3abedc58694df5
chsh -s /usr/bin/fish
# Restart your shell (may have to login/logout) to activate / test fish
# Install git
sudo apt install git
# Install git-flow
sudo apt install git-flow
# Install fisher (A fish package manager)
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
# Install asdf-vm (a language (such as python) version manager)
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
cd ~/.asdf
git checkout (git describe --abbrev=0 --tags)
# Install asdf-vm additional dependencies
# If you encounter any errors during use, there may be additional optional dependencies here: https://github.com/pyenv/pyenv/wiki/common-build-problems
sudo apt install \
automake autoconf libreadline-dev \
libncurses-dev libssl-dev libyaml-dev \
libxslt-dev libffi-dev libtool unixodbc-dev \
unzip curl libsqlite3-dev libbz2-dev liblzma-dev
# Install fish shell integration for asdf
fisher add rstacruz/fish-asdf
# Install python plugin for asdf
asdf plugin-add python
# Install python and set global version
asdf install python 3.7.3
asdf install python 2.7.16
asdf global python 3.7.3 2.7.16
# You may need to restart your shell for the asdf shim to become active
# You can check this with `which python`. It should report: /home/user/.asdf/shims/python
# Install pipenv (a python virtualenv manager)
pip install --upgrade pip
pip install pipenv
fisher add kennethreitz/fish-pipenv
set -U pipenv_fish_fancy yes
asdf reshim
# Note: pipenv command will not work until you restart the shell (may need to login/logout)
# Configure Pipenv to store .venv folders in project folder
# This may break certain builds when using docker with volume mounts as test environments
set -Ux PIPENV_VENV_IN_PROJECT 1
# Install Dart SDK
sudo apt update
sudo apt install apt-transport-https
sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt update
sudo apt install dart
# Install fvm
pub global activate fvm
# Add pub-cache to fish path
set -U fish_user_paths ~/.pub-cache/bin $fish_user_paths
# Install flutter SDK
fvm install 1.23.0-18.1.pre
fvm use 1.23.0-18.1.pre --global
# Install docker from docker repos (may need to run some commands in bash)
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
# Restart your shell
# Bonus: Customize your shell
fish_config
# Note: To add things to fish shell path, use this
set -U fish_user_paths /usr/local/bin $fish_user_paths
# Now you can actually develop shit without fucking everything up all the time *
* Unless all these intructions fucked everything up. Which is likely. So good luck unwrapping the snake spaghetti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment