2

I am setting up a new computer and the current latest version of Python is Python 3.4.6. I am trying to update it to version 3.7.0 (the latest version at the time of writing).

I tried pyenv install 3.7.0 and it successfully installed.

But when I type $ python3 --version at the command line it still says Python 3.4.6.

When I type $ which python3 the path it shows is /.pyenv/shims/python3. Navigating to that path I find that there also exists /.pyenv/shims/python3.7.

How do I point the python command to the newest install?

I know there are a million questions asking how to point python from Python 2.x to Python 3.x. But I have not found one showing how to point from Python 3.old to Python 3.new

I am using Linux OpenSuse.

berkelem
  • 2,005
  • 3
  • 18
  • 36
  • Possible duplicate of [How do I upgrade the Python installation in Windows 10?](https://stackoverflow.com/questions/45137395/how-do-i-upgrade-the-python-installation-in-windows-10) – B. Cratty Oct 15 '18 at 16:21

1 Answers1

2

Use the pyenv global command. In this case, it should be pyenv global 3.7.0. Check out the pyenv commands list for more info.

Alan Williams
  • 509
  • 1
  • 8
  • 26