Installation Drawing math library matplotlib, pycharm used in a variety of emerging error solution! ! !

Because numpy library and the library version will matplotlib conflict, if a version mismatch error will be a variety of fancy! ! ! (Windows10)

I experienced a few hours to try various methods under, and finally resolved all error, can be used normally matplotlib library pycharm in.
Record what solutions :::

(1) mumpy version matplotlib libraries and libraries I installed as follows:

matplotlib: 3.1.3
numpy: 1.18.1
python: 3.8

1. Check the installed version of the library pycharm method:

Here Insert Picture Description
Here Insert Picture Description
Or:
Open file-> Settings
Here Insert Picture Description

2. Terminal View:

Here Insert Picture Description

(2) proper installation:

1. Install numpy library

Directly in the terminal

pip install numpy

Or directly in the pycharm

Here Insert Picture Description

2. Install matplotlib

If you have installed the latest version matplotlib library, direct unloading, needless to say. Error because the version is not compatible, do not want to uninstall how to do Oh! ! !

After trying a lot of ways, I found this in the only possible way:
install matplotlib download .whl library file.
.whl file python for all kinds of third-party libraries Download

.Whl find their own version of the file to download (it must be version 3.1.3):
Here Insert Picture Description
The last cd into the download folder;
then pip install path to the file! ! !
(Note: If the absolute path to the file)

Published 65 original articles · won praise 50 · views 3585

Guess you like

Origin blog.csdn.net/qq_44907926/article/details/104775618