Integrate Anaconda into Pyenv

If you use Pyenv to install multiple Python versions side-by-side and installed Anaconda to create virtual environments for each of your projects, install pyenv-virtualenv to integrate them.

Anaconda without the pyenv-virtualenv integration overwrites the PATH, and places itself to the front before pyenv would be able to handle the Python command calls. pyenv-virtualenv seamlessly combines the functionality of pyenv and Anaconda to handle the multiple Python versions and virtual environments.

The source code is at https://github.com/pyenv/pyenv-virtualenv

Install pyenv-virtualenv

Use Home Brew for the recommended installation

brew install pyenv-virtualenv

Add the initialization code to the ~/.bashrc, ~/.zshrc file:

eval "$(pyenv virtualenv-init -)"

Leave a comment

Your email address will not be published.