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:
- Install big sur
- 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
- remove brew (use the uninstall script found on the web site: https://docs.brew.sh/FAQ#how-do-i-uninstall-homebrew
- Run
xcode-select --install
to install the commandline tools - (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"
- install miniconda3 from the installer: https://docs.conda.io/en/latest/miniconda.html
- (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.
- my
.tmux.conf
set shell to/usr/local/bin/zsh
-- zsh on big sur moved to:/bin/zsh
- install tmux via conda:
conda install tmux -c conda-forge
- create a conda environment for personal stuff:
conda create --name sdev
then:conda activate sdev
) - 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 - Installed the conda-forge package for the neovim python backing:
conda install neovim -c conda-forge
- Removed the line in my vimrc pointing at homebrew's python, so that neovim would use the python from the conda environment.
- 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) - set up development tools (
conda install cmake
etc.) - 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"