gontxomde
gontxomde

Reputation: 152

Problem with Pyenv and Pyenv-virtualenvwrapper in macOS

I am trying to create a virtual environment in macOS with Pyenv and Pyenv-virtualenvwrapper. I have other virtualenvironments created, but I have noticed the python versions inside .virtualenvs are being linked to /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/-like paths.

If I run pyenv versions I get

  3.9.12
  3.9.18
  3.10.13

But if I run mkvirtualenv -p 3.9.12 env-name I get:

RuntimeError: failed to find interpreter for Builtin discover of python_spec='3.9.12'

My .zshrc file looks like this:

PYTHON_CONFIGURE_OPTS="--enable-framework"

export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
pyenv virtualenvwrapper

I have read the docs of pyenv an virtualenvwrapper and everything seems to have been installed correclty.

Upvotes: 0

Views: 61

Answers (0)

Related Questions