Solved Apple MacOS system installation using Python and pip tools to install third-party modules



Python is a computer programming language that can be used on any operating system, and some friends use Apple computers when learning python. However, the built-in system of Apple computer is macOS instead of Windows, so some friends don’t know how to install Python, pip tool and third-party modules, then the following will introduce the detailed steps:









Error report



A small partner in the fan group is Apple Computer. He wanted to use pip to install a third-party module. He came to me for help, and then helped him solve it. partner:

insert image description here





Install Python



1. The Apple computer comes with python2.x version, but the macOS operating system may be slightly different between different versions.But the Python3.x version is mainly used at present, so we go to the official website to download and install: Python official website


Note : Don’t choose the M1 chip as the suffix .Intel, download pkgthe file, double-click to open it, and then install it all the way in a fool’s way.



2. If the Apple computer uses the pip tool to install the python third-party library, it is also executed on the command line, but the name of the command line in the Apple computer is the terminal. At the same time, press on the keyboard command + 空格键to pop up a quick search bar, type terminal in the input box and click the search result to open it:


insert image description here


Execute the following command to automatically install:

brew install python3

3. Check whether Python is installed successfully, enter the following command,If the version number corresponding to your downloaded Python appears, it is successful.

python3 --version

insert image description here



Install the pip tool



1. Call easy_installthis program management tool by command to download and install pip. The command is as follows:

sudo easy_install pip

2. Check whether pip is successfully installed. Enter the following command and the version number appears to indicate that the installation is successful:

pip --version

insert image description here

Install third-party modules


After you have the pip tool, you can use the general python package download command to install the python third-party library, but you need to add a sudo before the command to indicate administrator privileges. The command is as follows:

sudo pip3 install 第三方模块包名

The above is the solution to the cause of this error. Welcome to leave a message in the comment area to discuss whether it can be solved.If it is useful, please like and collect the article. Thank you for your support. The blogger has the motivation to keep recording the problems encountered.!!!

Thousands of full-stack VIP Q&A group to contact bloggers to help solve errors

Due to the limited time and energy of bloggers, there are too many private messages every day, and there is no way for every fan to reply in time, so VIP fans are given priority to reply. You can enter the thousand-person full stack by subscribing to the time-limited 9.9 paid column "100 Days Mastering Python from Getting Started to Employment" VIP answering group, get priority answering opportunities (code guidance, remote service), free prostitution 80G learning materials spree, column subscription address: https://blog.csdn.net/yuan2019035055/category_11466020.html

  • Advantages :The author gives priority to answering opportunities (code guidance, remote service), and many bigwigs in the group can hold together to keep warm (big factory internal promotion opportunities). This column is a complete set of teaching specially prepared for students with zero foundation and those who need advanced improvement , From 0 to 100, continue to advance and deepen, and there will be practical projects in the follow-up, so you can easily deal with interviews!

  • Column benefits :Resume guidance, internal referral for recruitment, physical book delivery every week, 80G full-stack learning videos, 300 IT e-books: Python, Java, front-end, big data, database, algorithm, crawler, data analysis, machine learning, interview question bank, etc.

  • Note : If you want to get a timely reply, communicate and learn with the big guys, after subscribing to the column, private message the blogger to enter the VIP Q&A group with thousands of peopleinsert image description here
    insert image description here

Free information acquisition, more fan benefits, follow the official account below to obtain

insert image description here

Guess you like

Origin blog.csdn.net/yuan2019035055/article/details/128448375