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

  • Learn Python in 7 Days
  • Mohit Bhaskar N. Das
  • 276字
  • 2021-07-09 20:40:19

Installation on Mac OS

For Mac OS, you will get the installer from the site https://www.python.org/downloads/mac-osx/

For the new Mac OS X, Sierra comes loaded with Python 2.7 and it's good for learning but the same cannot be used to develop advanced-level programs. You do not need to separately install Python on the new Mac OS X. However, a word of caution is that the version of Python packed with the Mac OS could be out of date and might require updating. If you still want to install a separate version, you can follow the simple steps mentioned as follows:

  1. First of all, you might require to install Xcode, Xcode is the IDE for  platform and can be downloaded from the Apple appstore.
  2. Once Xcode is installed, you need to install the command-line tools, which can be installed by running the xcode-select --install command on the terminal found under /Applications/Utilities/, as shown in the following screenshot:
  1.  A pop-up window appears with three different options as shown here:
  1. Once you click on Install and agree to their terms and conditions, the command-line tools will start to download and will be installed in few minutes depending on the Internet connection.
  1. The next step in the process would be to install Homebrew, which is a package manager for Mac OS and handles the Python package. In order to install Homebrew, simply provide the following inputs to the terminal:

      /usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. To install the latest python2 version, simply type brew install python on the terminal:
      $ brew install python
In order to install python3, you need to use brew install python3.
主站蜘蛛池模板: 杭州市| 文水县| 荃湾区| 额敏县| 正定县| 开远市| 崇左市| 务川| 石棉县| 平邑县| 城步| 壶关县| 临汾市| 新乡市| 盘山县| 山东省| 孟州市| 双辽市| 邛崃市| 交口县| 惠州市| 剑川县| 颍上县| 新河县| 瓦房店市| 乌恰县| 长丰县| 札达县| 大田县| 安溪县| 巴彦县| 邵武市| 荔浦县| 镇康县| 尼木县| 绿春县| 新蔡县| 武陟县| 永昌县| 岗巴县| 仁寿县|