I'm not sure if you have to uninstall any versions of Python before you do this, but I doubt it. You might want to checkout your bashrc to make sure there isn't any weird Python PATH stuff in there before we start.
- Install Pyenv, probably via the "Basic GitHub Checkout" method
- Add the necessary stuff to your
- Restart terminal
- Maybe install dependencies? (You may be good to go already.)
pyenv install --listand pick new-ish-but-stable versions of python2 and python3 to install. For example:
pyenv install 3.70 2.7.15
- You can set version 3 as the global, with 2 as fall-back:
pyenv global 3.7.0 2.7.15. You could also set the
systemversion as a fallback, with
pyenv global 3.7.0 2.7.15 system.
- Check that
pipis installed (I think it's included?). You should be able to upgrade
pip3 install --upgrade pipand
pip2 install --upgrade pip
Let's see how we did: If successful,
python2 gets you Python 2,
python gets you Python 3. Similar with
To install autosub (which I think necessitates Python2) run
pip2 install autosub
Deoplete / Neovim
Now that we've got a nice little Python and Pip environment set up, let's make sure Deoplete is using it.
If you use Neovim + Deoplete, you probably want to run
pip3 install neovim to ensure Deoplete works smoothly (see Deoplete's requirements).
I also ran
pip2 install neovim because Neovim's
:CheckHealth told me too. At this point, you may need to update Deoplete by running
:UpdateRemotePlugins in Neovim. (Neovim's
:CheckHealth is your friend here.)