You want pyenv, "a tool for simple Python version management," that can be installed on many operating systems. Homebrew will give you a version of Python, but the version you get will be out of your control if you let the tool manage your environment for you.
![how to update python on mac command line how to update python on mac command line](https://documentation-4.mamp.info/en/MAMP-PRO-Mac/Languages/Python/Python.png)
#HOW TO UPDATE PYTHON ON MAC COMMAND LINE INSTALL#
Naively, you might think that you next brew install python or something. Once this is done, congratulations, you have an excellent package management tool in Homebrew. If you, like me, have trust issues with arbitrarily running scripts from the internet, click on the script above and take a longer look to see what it does. Next, install Homebrew by executing the following Ruby script from the internet: ruby -e " $(curl -fsSL )" This step is required on MacOS to set up local development utilities, including "many commonly used tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, what, and many other useful commands that are usually found in default Linux installations," according to OS X Daily. Click to confirm, and you'll be all set with a basic development environment. Preparationįirst, open a terminal and enter xcode-select -install at its cold, uncaring prompt.
![how to update python on mac command line how to update python on mac command line](https://www.maketecheasier.com/assets/uploads/2016/12/python-3-cli-2.png)
Here is the best way to do it (although we have written about other ways to manage Python environments on MacOS). If you're a Python developer and a Mac user, one of your first tasks upon getting a new computer is to set up your Python development environment.