$ brew update
$ brew install pyenv
$ pyenv install -l
$ pyenv install miniconda3-latest
$ cd /path/to
$ pyenv local miniconda3-latest
$ conda create -n foo anaconda
$ source /usr/local/var/pyenv/versions/miniconda3-latest/envs/foo/bin/activate foo
$ conda-env remove -n foo
Personal recommendation: Don't use pyenv to install Anaconda or Miniconda. Both pyenv and conda are able to manage different python environments.
https://stackoverflow.com/questions/58044214/installing-anaconda-with-pyenv-unable-to-configure-virtual-environment