For latest official version:
$ pip install --user g
$ pip install --user --upgrade g
New versions of g are published to PyPI as alpha, beta, or release candidates.
In their versions you will see notfication like
1.10.0b4 would mean the 4th beta release of
1.10.0 before general availability.
$ pip install --user --upgrade --pre g
$ pipx install --suffix=@next 'g' --pip-args '\--pre' --force
g@next sync [config]....
via trunk (can break easily):