windows python+numpy installation practical tutorial
- 2020-06-19 10:50:16
- OfStack
Such as the title, today go round and round to find a lot of website posts, a link to break, finally installed a lot of time.
I hope this post can help those in need and teach you how to do python+numpy for one post, saving time for scientific research.
The level is limited, it is hard to avoid the existence of deficiencies, please correct.
* * * * * * * * * * * * * * * * * * * python installed * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
step1: Download the installation package from the official website;
https://www.python.org/
I downloaded python- 3.4.4.4.ES19en
step2:python environment variable configuration;
Computer - Properties - High-level System Settings - Environment variables - System variables
Find PATH, click Edit, add English semicolon; Add python.exe to the semicolon and click OK
step3: python installation verification
W+R Run cmd, open the terminal, type
python
Display version information to indicate successful installation;
* * * * * * * * * * pip installation (such as python version bring pip can skip, cmd input pip to view) * * * * * * * * * * * * * * * * * *
step4: After entering cmd, installation of pip only requires 1 command line:
python -m pip install -U pip
No need to install ES58en-ES59en first.
step5:1 Add the path of ES63en.exe to PATH according to THE method of step2. pip file 1 is generally in script directory of python installation package, otherwise it will report that pip is not an internal command cloud.
For example, the variable I added is
;D:\Python34\Scripts;
* * * * * * * * * * * * * * * * * * * numpy installed * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
step6: Download the corresponding version of numpy installation package, whl file
In site https: / / pypi. python. org pypi/numpy with corresponding whl python version, see table pyversion1 bar, check version, otherwise an error does not support platform
step7: installation
With that done, the actual installation of numpy begins, entering cmd and the directory where whl resides. If stored on the D disk, type command line
D:
Then press Enter to enter the D disk, type the command line cd and enter the folder where whl exists. For example, mine is:
cd D:\Python34\Scripts\
Enter the command line again
pip install numpy The file name .whl
step8: Import numpy to python
Open the python exe
Enter the command line
from numpy import *
step9: testing
To quote machine Learning Practice tests:
Open the python exe
Enter the command line
random.rand ( 4,4 )
Will return a 4*4 random number group, because it is a random number generated, the computer generated random Numbers are completely different.
* * * * * * * * * * * * * * * * * * * installed * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Feel free to install numpy. If the installation is unsuccessful, here are the corresponding solutions
conclusion
Above is the full content of this article on windows python+numpy installation practical tutorial, I hope to help you. Those who are interested can continue to see this site:
Python numpy generates matrix, series matrix code sharing
Python was programmed to add a column method example to the numpy matrix
Some sorting methods of numpy array are discussed
If there is any deficiency, please let me know. Thank you for your support!