win10 python3.6.3 'pip package by mounting the numpy matplotlib' + 'simple demonstration'

win10 python3.6.3 'pip package by mounting the numpy matplotlib' + 'simple demonstration'

Small text structure Quantity
A problem actually encountered Two
Two mounting mat package with np Five Steps
III. A simple demonstration Two-step

Problems encountered are as follows:
1.python not installed in the system tray, by 'pip install -U pip' can not upgrade directly pip
2. have not used pip Package Manager to install the new package

Case of a problem as follows:
A case where the above problems FIG.

Under reference predecessors by Baidu and share my last post solving process:
1. Press' win + R ', open the "Run" window, enter' in the window cmd ', open a command prompt serial
Press 'win + R', and enter 'cmd', click OK (ENTER)
2. Enter' Python - ensurepip m 'pip to install the package
This will only install pip package, the other does nothing
3. enter' Python -m -i https://pypi.doubanio.com/simple/ --upgrade the install pip pip 'pip update package
Here Insert Picture Description
4. enter' pip the install --upgrade numpy 'installation numpy package (installation requires a few minutes), the installation is completed and then enter 'pip install --upgrade matplotlib' matplotlib installation package
Here Insert Picture Description
5. at this point it is mounted with matplotlib numpy finished package, which may be introduced in the use of IDLE.

Let's write a simple code to try these two packages:
1. Open the shell python3.6.3, 'Ctrl + N ' Create a new file py
Here Insert Picture Description
2. linspace take the point, and with pyplot display, F5 to run the code

# f(x) = x**2
# 实现函数f(x)=x**2,并画出图形

def f(x):			#定义f(x)函数
	return x**2
import numpy as np 			#导入numpy模块并别名np
x = np.linspace(-5,5,num = 100) #(-5,5)中平均取100个点
y = f(x)

import matplotlib.pyplot as plt #导入画图模块并别名为plt
plt.plot(x,y)				#取点
plt.show()				#显示

Here Insert Picture Description
Incidental link:
1.python download HTTPS official website ::: //www.python.org/downloads/
2.python install the module's official website: https: //docs.python.org/zh-cn/3.6/installing/index. html

This is above all contents of this small article, thank you seniors convenience previous article provided, for the first time made the article, inadequate please a lot of guidance, thank you!

Published 34 original articles · won praise 9 · views 3051

Guess you like

Origin blog.csdn.net/RObot_123/article/details/102647188
Recommended