Sincerest apologies if this is easily found elsewhere, but although I found a number of posts with pyenv and Anaconda explanations, none addressed this issue specifically. H
Not super familiar with conda but I do use pyenv a lot.
Pyenv has its own virtualenv manager that you can use. You can always check which virtualenv version is active with:
pyenv versions
You should see something like:
system
20190814_125309
* 3.7.4 (set by /home/tzhuang/.pyenv/version)
3.7.4/envs/20190814_125309
3.7.4/envs/buildmaster-sandbox
3.7.4/envs/HEAD
3.7.4/envs/myenv
3.7.4/envs/sandbox
buildmaster-sandbox
HEAD
myenv
sandbox
Where the * indicates the currently active virtualenv (this can be set using pyenv global like you mentioned). You can manually activate any virtualenv with:
pyenv shell
Eg.
pyenv shell sandbox
Then running pyenv versions gives:
system
20190814_125309
3.7.4 (set by /home/tzhuang/.pyenv/version)
3.7.4/envs/20190814_125309
3.7.4/envs/buildmaster-sandbox
3.7.4/envs/HEAD
3.7.4/envs/myenv
3.7.4/envs/sandbox
buildmaster-sandbox
HEAD
myenv
* sandbox
It's generally a good idea to install any packages you want into a new virtualenv instead of the global virtualenv. It makes it easier to debug environment/dependency issues should you run into any.