SoFunction
Updated on 2024-10-30

windows python 3.9 Numpy scipy and matlabplot installation tutorial details

Learning python process want to use python matlabplot drawing function, encountered a large number of problems, and then all the way through, and finally installed successfully, it is not easy to post to remember.

1 First open cmd

win+r

2 pip installation

pip3 install --user numpy scipy matplotlib

The -user option allows you to set it to be installed only under the current user, instead of writing to the system directory. The default is to use a foreign line, which is too slow, so we'll just use the Tsinghua image::.

pip3 install numpy scipy matplotlib -i /simple

How the network is not good, we can install them individually one by one

pip3 install numpy s -i /simple

pip3 install scipy -i /simple

pip3 install matplotlib -i /simple

3 Error encountered while installing matlabplot:

Using legacy ' install' for matplotlib, since package 'wheel' is not installed.

Installing collected packages: matplotlib

    Running install for matplotlib ... error

    ERROR: Command errored out with exit status 1:

在这里插入图片描述

Check your own python version:

Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.

在这里插入图片描述

My python is 3.9 AMD64

Find worldcould at the /~gohlke/pythonlibs/ site
在这里插入图片描述

Pick your own corresponding .whl download. My pick:

wordcloud-1.8.0-cp39-cp39-win_amd64.whl

Then go back to cmd

4 Installation

pip install wordcloud-1.8.0-cp39-cp39-win_amd64.whl

在这里插入图片描述

5 Error again

Using legacy ' install' for matplotlib, since package 'wheel' is not installed.

Direct installation of wheel

pip install wheel

6 Installing matlabplot again

pip3 install matplotlib -i /simple

unsuccessful

7 Find matlabplot in /~gohlke/pythonlibs/

在这里插入图片描述

Download and install.

pip3 install matplotlib-3.3.2-cp39-cp39-win_amd64.whl

在这里插入图片描述

It shows a successful installation, so hurry up and find a program to try:

import numpy as np 
from matplotlib import pyplot as plt 
 
x = (1,11) 
y = 2 * x + 5 
("Matplotlib demo") 
("x axis caption") 
("y axis caption") 
(x,y) 
()

在这里插入图片描述

Successful installation with a twist

To this point this article on windows python 3.9 Numpy scipy and matlabplot installation tutorials explain the article is introduced to this, more related to the installation of python 3.9 Numpy scipy and matlabplot content, please search for my previous posts or continue to browse the following related articles I hope that you will be more! I hope you will support me in the future!