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

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.

主站蜘蛛池模板: 临江市| 昌邑市| 中方县| 瑞金市| 禄劝| 普安县| 砀山县| 工布江达县| 镇平县| 石柱| 南澳县| 若羌县| 长沙市| 松原市| 临沭县| 阳山县| 抚宁县| 阿城市| 会昌县| 南靖县| 磐安县| 沂水县| 休宁县| 白城市| 西乌珠穆沁旗| 淅川县| 长顺县| 井研县| 罗定市| 广丰县| 建阳市| 晋州市| 宜兰市| 中方县| 二连浩特市| 兴化市| 东乡族自治县| 南华县| 望城县| 青龙| 紫金县|