English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
As the title suggests, today I have searched for many websites and posts, broken down each link one by one, and it took a lot of time to install it in the end.
I hope this post can help those in need, teaching you to solve python in one post+numpy, saving scientific research time.
My level is limited, and there may be some deficiencies, please correct them.
*******************python installation****************************************************
step1:Download the installation package from the official website;
I downloaded python-3.4.4.msi
step2:python environment variable configuration;
Computer-Properties-Advanced system settings-Environment variables-System variables
Find PATH, click Edit, add an English semicolon; add the path of python.exe after the semicolon, click OK
step3:python installation verification
W+R run cmd, open the terminal, and enter
python
Displaying version information indicates that the installation was successful;
**********pip installation (if the python version comes with pip, you can skip it, and type pip in cmd to view)******************
step4:After entering cmd, pip installation only needs one command line:
python -m pip install -U pip
There is no need to install easy-install.
step5:Be sure to follow the step2method to add to PATH, the pip file is usually in the script directory of the python installation package, otherwise it will report an error that pip is not an internal command and so on.
For example, the variable I added is
;D:\Python34\Scripts;
*******************numpy installation****************************************************
step6:Download the installation package of the corresponding version of numpy, whl file
on the websitehttps://pypi.python.org/pypi/numpyThe corresponding whl for the python version, check the pyversion column in the table, make sure the version is correct, otherwise it will report an error that the platform is not supported
step7: Install
After the above preparation is done, the real numpy installation begins, enter cmd, enter the directory where the whl is stored. If it is stored in D disk, type the command line
D:
Then press Enter, at this time enter D disk, type the command line cd specific filename, enter the folder where the whl exists, for example, mine is:
cd D:\Python34\Scripts\
Then enter the command line
pip install numpy_filename.whl
step8: Import numpy into python
Open python.exe
Enter the command line
from numpy import *
step9: Test
Citation from the test example of the book 'Machine Learning in Action':
Open python.exe
Enter the command line
random.rand(4,4)
Will return a4*4The random array, because it is generated by random numbers, the random numbers generated by different computers are completely different.
*******************Installation completed****************************************************
Install numpy with confidence, if the installation is not successful, there are corresponding solutions here:Summary of simple solutions to the failure of numpy module installation in python
Summary
That is all about python under windows in this article+The full content of the practical tutorial of numpy installation, I hope it will be helpful to everyone. Those who are interested can continue to refer to this site:
Code sharing of generating and concatenating numpy matrices in Python
Example of adding a column to a numpy matrix in Python programming
A brief introduction to several sorting methods of numpy arrays
Welcome to leave a message if there is anything lacking. Thank you for your friends' support of this site!
Declaration: The content of this article is from the network, the copyright belongs to the original author, the content is contributed and uploaded by Internet users spontaneously, the website does not own the ownership, has not been edited by humans, nor does it bear relevant legal liability. If you find any suspected copyright content, please send an email to: notice#w3Please report abuse by email to codebox.com (replace # with @), and provide relevant evidence. Once verified, the website will immediately delete the infringing content.