1. Download the latest version of Python 3.X from the official website and install it; Because Python 2.7 is already integrated by default in Mac OS X EI Capitan, you need to enter PYTHON3 in terminal to detect if the installation was successful, and the Python command calls PYT by default. Hon 2.7.
2. Install Pip Download the get-pip.py file from the official web page (don't mind if the page is based on the Python version that you have installed, enter the command PIP directly in the terminal, if it is not valid, prove that it is not installed), and then enter into the directory where get-pip.py is located, using the Python command to install Pip: python get-pip.py
After the installation is complete, enter PIP test
3. It is then important to note that the Python 3.X environment is used under the Python3 command, and the Python3 is used under the PIP3 command. x environment, such as:
Therefore, in the installation of some package, you need to distinguish between Pip or PIP3, otherwise error, such as Pip install aiohttp will be wrong, but PIP3 install aiohttp success;
Install Python on Mac