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

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.

主站蜘蛛池模板: 新疆| 纳雍县| 祁阳县| 罗山县| 炎陵县| 慈溪市| 阳高县| 奎屯市| 广饶县| 九龙城区| 邳州市| 陕西省| 巴林左旗| 通许县| 江油市| 读书| 化德县| 咸宁市| 南华县| 铁岭县| 长岛县| 富阳市| 蒙城县| 郯城县| 郑州市| 玉门市| 玉田县| 玉屏| 柯坪县| 玛曲县| 锦屏县| 临武县| 徐水县| 大英县| 武义县| 尼玛县| 慈利县| 杭锦旗| 元阳县| 茌平县| 封丘县|