I am currently using Google ML notebooks to train a lot of my NLP projects. Lately, I wanted to use Kashgari, but there is an issue. The catch is Google notebooks run on Debian Stretch which contains Python <3.5. Kashgari, and hence I, need Python >3.6. One obvious way is to change from Stretch to Buster using debian’s apt-get itself, and everything is good. Except, it overwrites grub settings and other side-effects which bricks the vc. The alternative would be to actually make update just the python without messing around with the rest of the system. What is the easiest way to do this? Note that I want the jupyter notebooks to use the new python3 version; so just a local venv will not be enough.
2
Answers
You probably want
pyenv
. It allows pretty flexible python version control without messing with the system.https://github.com/pyenv/pyenv
You can always just download python from the source and compile it, it only takes 2 commands.
However you shouldn’t replace the system’s python installation, a lot of its utilities use it, you should install another interpreter alongside it