Summary: To activate a pyenv environment, pyenv is requiring me to include the path to the environment instead of just the environment name.
I was previously able to run pyenv activate env_name
, whereas now I must run pyenv activate 3.9.1/envs/env_name
.
I accidentally deleted some files in my home directory, but I still had (at least some of) my .pyenv, and it still contained files in the versions
directory with the names of my environments. When I ran pyenv
, it did not recognize the command.
So I reinstalled pyenv, first copying the old .pyenv into a separate forlder, and then I copied the contents of versions
and shims
into the new .pyenv.
Now, if I run pyenv versions
or pyenv virtualenvs
, it does include the environment I want: 3.9.1/envs/env_name
. However, if I type pyenv activate env_name
, it says that there is no virtual environment with that name. However, If I type pyenv activate 3.9.1/envs/env_name
, it does work. In the past, before accidentally deleting those files, it would recognize my environment without prepending 3.9.1/envs
on the environment name.
I'm running linux.