pyenv .zshrc producing errors on new set-up

Viewed 176

I've been working on setting up virtual environments for the first time, and I'm running into a simple problem, but I'm running into roadblocks.

I've followed the step-by step process to enabling pyenv, and I believe that I have it correct with the exception of adding to the .zshrc file on macOS.

Using zsh, I've added these lines to the code:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc

When I create a new py file, in Visual Code Studio, I see these errors:

bash: ‘export: command not found
source /Users/cnichols/.pyenv/versions/venv_one/bin/activate
bash: /Users/cnichols/.bash_profile: line 12: syntax error near unexpected token `then'
bash: /Users/cnichols/.bash_profile: line 12: `‘eval “export PATH="/usr/local/Cellar/pyenv-virtualenv/1.1.5/shims:${PATH}"; export PYENV_VIRTUALENV_INIT=1; _pyenv_virtualenv_hook() { local ret=$? if [ -n "$VIRTUAL_ENV" ]; then eval "$(pyenv sh-activate --quiet || pyenv sh-deactivate --quiet || true)" || true else eval "$(pyenv sh-activate --quiet || true)" || true fi return $ret }; typeset -g -a precmd_functions if [[ -z $precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then precmd_functions=(_pyenv_virtualenv_hook $precmd_functions); fi”’'

What exactly am I doing wrong here?

0 Answers
Related