Below are things we need to ensure pyenv magically modified our enviroment variables to point specific version of python.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ brew install pyenv $ cd <project_path> $ pyenv install 3.6.8 $ pyenv local 3.6.8 $ pyenv init # Load pyenv automatically by appending # the following to ~/.zshrc:
eval"$(pyenv init -)"
$ which python /usr/local/bin/python $ eval"$(pyenv init -)"
# FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'
# or from shell
$ latex # latex not found
Fix
install Tex Live for macOS
append PATH for /Library/TeX/texbin
1 2 3 4 5 6 7 8
$ wget http://tug.org/cgi-bin/mactex-download/MacTeX.pkg # checksum and install MacTeX.pkg
# assuming you are using zsh $ echo'export PATH="$PATH:/Library/TeX/texbin"' >> ~/.zshrc
# assuming you are using bash $ echo'export PATH="$PATH:/Library/TeX/texbin"' >> ~/.bashrc
Verify it
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ export PATH="$PATH:/Library/TeX/texbin" $ latex --version pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018) kpathsea version 6.3.0 Copyright 2018 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.34; using libpng 1.6.34 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.00