Install NumPy + SciPy + Matplotlib and windows10numpy in Windows 10 + Python3
Numpy, SciPy, and MatplotLib are essential libraries for scientific computing in Python. I encountered various problems during installation using other methods and found that installing the. whl package directly is the fastest and no error is reported.
1. Download The. whl package
Find the. whl file to download from the following website
Http://www.lfd.uci.edu /~ Gohlke/pythonlibs/
To be consistent with the locally installed version, the whl file I selected is:
Numpy-1.13.0 + mkl-cp36-cp36m-win32.whl
Scipy-0.19.1-cp36-cp36m-win32.whl
Matplotlib-2.0.2-cp36-cp36m-win32.whl
2. Start installation on the command line
> Pip3 install c: \ (whl File Download path) \ numpy-1.13.0 + mkl-cp36-cp36m-win32.whl
> Pip3 install c: \ (whl File Download path) \ scipy-0.19.1-cp36-cp36m-win32.whl
> Pip3 install c: \ (whl File Download path) \ matplotlib-2.0.2-cp36-cp36m-win32.whl
If no problem exists, the installation is complete.
3. Start testing
Test code from: http://www.cnblogs.com/jasonfreak/p/5441512.html thanks to author
1 from numpy import array 2 from numpy. random import normal 3 from matplotlib import pyplot 4 5 def genData (): 6 heights = [] 7 weights = [] 8 grades = [] 9 N = 10000 10 11 for I in range (N): 12 while True: 13 # height follows the average value of 172, normal Distribution with Standard Deviation 6 14 height = normal (172, 6) 15 if 0
Running result:
DrawBar (grades)
DrawPie (grades)
DrawHist (heights)
DrawCumulativeHist (heights)
DrawScatter (heights, weights)
DrawBox (heights)
Successful!