Last active
April 30, 2019 17:28
-
-
Save MADindustries/0b99e574f8efaad508dd0e67ab89f01e to your computer and use it in GitHub Desktop.
Set up a python development environment (macOS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS OUT OF DATE. Asdf has now succeeded pyenv and fisherman has made breaking changes to the cli commands | |
------------------------------------------- | |
# Install Homebrew (macOS package manager) | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
# Install fish (A better shell) | |
brew install fish | |
# Set fish as default login shell | |
# See here for additional options: https://gist.github.com/idleberg/9c7aaa3abedc58694df5 | |
sudo echo /usr/local/bin/fish >> /etc/shells | |
chsh -s /usr/local/bin/fish | |
# Restart your shell to activate / test fish | |
# Install git | |
brew install git | |
# Install git-flow | |
brew install git-flow | |
# Install fisherman (A fish plugin manager) | |
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher | |
# Install pyenv (a python manager) | |
brew install pyenv | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | |
fisher pyenv | |
# Install python and set global version | |
pyenv install 3.7.0 | |
pyenv global 3.7.0 | |
# Install pipenv (a python virtualenv manager) | |
pip install --upgrade pip | |
pip install pipenv | |
fisher pipenv | |
# Fix config race condition as described here: https://github.com/fisherman/pipenv/issues/1#issuecomment-385205034 | |
set -U fish_user_paths ~/.pyenv/shims $fish_user_paths | |
# Configure Pipenv to store .venv folders in project folder | |
set -Ux PIPENV_VENV_IN_PROJECT 1 | |
# Restart your shell | |
# 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