As the title suggests, I went round and round today looking for a lot of website posts, breaking them down link by link, and in the end it took a lot of time to get it fitted.
I hope this post will help those who need it and teach you to get python+numpy done in one post and save time on research.
The level is limited, there are inevitably deficiencies, please correct me.
*******************python installation ****************************************************
Step1: Download the installation package from the official website;
/
I downloaded python-3.4.
step2:python environment variable configuration;
Computer-Properties-Advanced System Settings-Environmental Variables-System Variables
Find PATH, click Edit, add a semicolon; add the path after the semicolon and click OK.
step3: python installation validation
W+R to run cmd, open the terminal, enter
python
Version information is displayed to indicate successful installation;
**********pip install (if python version comes with pip you can skip it, cmd type pip to check) ******************
STEP4: After entering cmd pip installation requires only one command line:
python -m pip install -U pip
There is no need to install easy-install first.
step5: Be sure to add the path to the PATH according to step2, the pip file is usually in the script directory of the python installer, otherwise it will report an error that pip is not an internal command cloud.
For example, I added the variable
;D:\Python34\Scripts;
*******************numpy installation ****************************************************
step6: download the appropriate version of the numpy installation package, whl file
on the web/pypi/numpyUnder the python version of the corresponding whl, look at the table pyversion column, check the version, otherwise it will be reported as unsupported platforms
Step7: Installation
After the above preparations are done, the real numpy installation begins, go to cmd and enter the directory where whl is stored. If it is stored in the D drive, then hit the command line
D:
Then press enter, at this point go to the D drive and hit the command line cd the specific filename to get into the folder where whl exists, like mine does:
cd D:\Python34\Scripts\
Enter the command line again
pip install numpyfilename.whl
step8:import numpy to python
show (a ticket)
Enter the command line
from numpy import *
step9: test
Cite the test example from Machine Learning in Action:
show (a ticket)
Enter the command line
(4,4)
Will return a 4 * 4 random array, because it is generated random numbers, computer different generated random numbers are completely different.
******************* installation completed ****************************************************
Install numpy with confidence, and if it doesn't work, here's how to fix it:Summary of simple solutions for unsuccessful installation of python's numpy module
summarize
Above is this article on windows python + numpy installation of practical tutorials all content, I hope to help you. Interested friends can continue to refer to this site:
Python numpy generate matrix, series matrix code sharing
Python programming to numpy matrix add a column method example
An introduction to several ways of sorting numpy arrays
If there are any shortcomings, welcome to leave a message to point out. Thank you friends for the support of this site!