Install Python on Mac, installpython

Source: Internet
Author: User

Install Python on Mac, installpython

1. download the latest version of Python 3.X from the official website and install it. Because Python 2.7 is already integrated in Mac OS X EI Capitan by default, you need to enter Python3 in Terminal to check whether the installation is successful, python 2.7 is called by default using the Python command.

2. install pip; download the get-pip.py file from the official website page (do not care about the Page Based on the python version to determine whether you have installed, directly enter the command pip in Terminal, if not, it turns out there is no installation), then enter into the get-pip.py directory, use the python command to install pip: python get-pip.py

Enter pip to test the installation.

3. Note that python 3 uses the python 3. X environment and pip3 uses the python3.X environment, for example:

Therefore, when installing some packages, You need to identify whether it is pip or pip3. Otherwise, an error occurs. For example, if pip install aiohttp fails, but pip3 install aiohttp succeeds;

Related Article

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.