官术网_书友最值得收藏!

Installing Python on macOS

While Python is pre-installed on macOS, that version of Python is 2.7. To install a newer version of Python, we recommend using a package manager for macOS called Homebrew. Homebrew is touted as the missing package manager for macOS; it simplifies the installation of many macOS software packages, including Python. To install Homebrew, follow the instructions on its website: https://brew.sh. At the time of writing, the command to install Homebrew in the Terminal is as follows:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once Homebrew has been installed, we can install the latest Python and pip, the Python package management system, with the following commands in the Terminal prompt:

$ brew install python3
$ brew install pip3

Check whether the latest Python and pip version have been correctly linked on your system with the commands in the Terminal prompt:

$ python --version
$ pip --version

The outputs of these commands should state versions similar to 3.7+ and 18.0+, respectively.

主站蜘蛛池模板: 青田县| 偃师市| 镇平县| 泸水县| 于田县| 峨山| 青铜峡市| 莲花县| 中卫市| 万宁市| 南溪县| 驻马店市| 延边| 涿州市| 铜川市| 靖安县| 手机| 金山区| 罗定市| 南木林县| 定陶县| 堆龙德庆县| 宁国市| 吴堡县| 香港| 惠安县| 光山县| 汤原县| 都江堰市| 伊金霍洛旗| 钦州市| 恩施市| 西充县| 昆明市| 华坪县| 桐梓县| 阳朔县| 罗平县| 茂名市| 民权县| 逊克县|