Pycharm installs third-party libraries and causes errors (Mac version)

Why is there an error in your mac's pycharm import numpy ? Why can’t I use numpy, pandas, matplotlib, or scipy? Why can't I install them?

Table of contents

1. Install third-party libraries (numpy, pandas, etc.) (mac computer)

2. Error when installing third-party libraries such as numpy

Analyze the cause of the error:


1. Install third-party libraries (numpy, pandas, etc.) (mac computer)

1. Open your pycharm project, click PyCharm in the upper left corner, and select preferences:

2. As shown in the picture, click the + sign:

 3. Enter the name of the third-party library you want to download, as shown in the figure, download:

 Then close this window directly if you see:

Okay, then congratulations, the installation is successful. You don’t need to read the following content. You are such a lucky guy. Go and type the code. 

 

2. Error when installing third-party libraries such as numpy

View error detailsdetails

 

1. Copy the content of the above error message ⬆️ and execute it in the terminal. (This means installing numpy through the terminal)

2. The error is still reported as shown in the figure:

Scroll to the bottom and you will see a warning like this (which means the pip version is wrong!)

 

Okay, let’s copy the prompt it gives us and execute it in the terminal:

 You can see that it still reports an error, okay.

Copy it and execute again:

 download successful.

You can go back to the pycharm installation and wait for about ten minutes.

 You can also execute it directly in the terminal just now:

pip install numpy

Then the installation is successful! 

Analyze the cause of the error:

The specification turns out to be inconsistent with the pip version.

 Look at the terminal prompts again to see if you understand the cause of the error~

 

Guess you like

Origin blog.csdn.net/weixin_46019681/article/details/125172692