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

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.

主站蜘蛛池模板: 盖州市| 望城县| 库尔勒市| 安新县| 霍林郭勒市| 墨脱县| 营山县| 临江市| 隆德县| 镇安县| 新兴县| 灵丘县| 攀枝花市| 潜江市| 娱乐| 孟州市| 遂昌县| 平顶山市| 德阳市| 阿拉尔市| 清河县| 黑龙江省| 澄迈县| 内黄县| 西华县| 綦江县| 赞皇县| 固原市| 津市市| 运城市| 稻城县| 朔州市| 自治县| 崇仁县| 纳雍县| 贡山| 磐石市| 吉安市| 鄂托克旗| 镇坪县| 周至县|