Skip to content

Instantly share code, notes, and snippets.

@ssteinbach
Last active January 14, 2022 06:31
Show Gist options
  • Save ssteinbach/07d789ec81eaf7a8334d1eae7111294f to your computer and use it in GitHub Desktop.
Save ssteinbach/07d789ec81eaf7a8334d1eae7111294f to your computer and use it in GitHub Desktop.

Goals:

  • terminal-based development environment
  • running on big sur
  • use tmux + neovim for most development things,
  • mostly developing in C++, python, lua and DSLs (quadplay, glsl, etc)
  • trade brew for conda:
    • conda runs on linux, mac and windows (although I haven't tried it on windows)
    • conda installs into user space, so its easier to trash/reset without impacting system paths (brew installs into /usr/local and I believe symlinks into system directories)
    • you can create multiple isolated environments... useful for dealing with conflicting dependencies and for testing
    • encapsulates both python and C++ in its environments

Steps:

  1. Install big sur
  2. I needed to reset the "T2" chip so that my thumb print/password worked correctly (I could log in but not do admin stuff): https://support.apple.com/en-us/HT201295
  3. remove brew (use the uninstall script found on the web site: https://docs.brew.sh/FAQ#how-do-i-uninstall-homebrew
  4. Run xcode-select --install to install the commandline tools
  5. (Applies to iterm/terminal.app, I use iterm) set iterm to be allowed to run non-notarized app, see preferences.security & privacy.developer tools "Allow the apps below to run software that does not meet the systems security policy"
  6. install miniconda3 from the installer: https://docs.conda.io/en/latest/miniconda.html
  7. (Neovim specific): The build scripts for neovim on mac assume homebrew. So rather than build neovim, I downloaded the latest nightly release and installed that.
  8. my .tmux.conf set shell to /usr/local/bin/zsh -- zsh on big sur moved to: /bin/zsh
  9. install tmux via conda: conda install tmux -c conda-forge
  10. create a conda environment for personal stuff: conda create --name sdev then: conda activate sdev)
  11. tmux depends on but does not install libncurses for some reason, so conda install ncurses -c conda-forge NOTE you need to get the version from conda-forge or you'll have a link issue with tmux
  12. Installed the conda-forge package for the neovim python backing: conda install neovim -c conda-forge
  13. Removed the line in my vimrc pointing at homebrew's python, so that neovim would use the python from the conda environment.
  14. Set conda-forge as the default channel: conda config --add channels conda-forge and then update everything to use forge packages: conda update conda (see: https://stackoverflow.com/questions/39857289/should-conda-or-conda-forge-be-used-for-python-environments)
  15. set up development tools (conda install cmake etc.)
  16. From tmux, which python would still point at the system python, rather than the one from conda. Login shells were fine, but from tmxu /usr/bin and /usr/local/bin were creeping in ahead of the paths I wanted. I had to add this line to my .tmux.conf to address that: set -g default-command "$SHELL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment