Python environment build on Mac

Source: Internet
Author: User

Mac comes with Python, if you need to view the version, open terminal to enter the following command:

Python--version

If you need to install a new version of Python, there are several ways to install, the first is to go to the Python website to download the installation files, or use the source code compiled (this is not very common), recommended to use homebrew for installation. If you don't know what homebrew is. It is recommended to take a look at its official website: http://brew.sh; to be precise, homebrew complements the Linux-like installation package Manager that Mac does not have, and is exceptionally convenient to use. Use the following command to install:

" $ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install) "

Where-E is for Ruby to execute the download code, homebrew is written using Ruby. After the installation is complete, use the following command to determine if homebrew is installed correctly:

Brew Doctor

If the your system is a ready-to-brew. proves that the installation was successful

Execute the following command to install the Python version you need, such as Python3:

Install Python3

You can use the previous command to view the version of Python that is installed.

Sometimes you may also want to see where the different Python versions are located, using the following command to query:

Type-a python (x)  x refers to the version you want to query, such as Type-a Python3

The Windows system can be installed directly by downloading the Python image on the website, and the Linux system can be installed using installation methods such as Apt-get install, which is not discussed here.

Python environment build on Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.