The most practical windows under Python+numpy installation
Title, today go round to find a lot of website posts, a link to break, finally loaded a lot of time.
Hope this post can help needy people, teach you a post to fix python+numpy, save research time.
The level is limited, inevitably exists insufficient, please correct me.
Python installation ****************************************************
Step1: Download the installation package on official website;
https://www.python.org/
I downloaded the python-3.4.4.msi.
Step2:python environment variable configuration;
Computer-Properties-Advanced system settings-environment variables-system variables
Find path, click Edit, add English semicolon, and after semicolon add the path of Python.exe, click OK
Step3:python Installation Verification
W+r run cmd, open terminal, enter
[HTML]View PlainCopy
- Python
Display version information indicates successful installation;
PIP installation (such as Python version comes with PIP can be skipped, cmd input pip can be viewed) ******************
STEP4: Pip installation only requires a command line after entering CMD:
[HTML]View PlainCopy
- python-m Pip install-u pip
You do not need to install Easy-install first.
STEP5: Be sure to pip.exe the path in accordance with the Step2 method to add to path, PIP file is generally in the Python installation package in the script directory, otherwise it will error PIP is not internal command and so on.
For example, the variable I added is
[HTML]View PlainCopy
- ;D: \python34\scripts;
NumPy installation ****************************************************
STEP6: Download the appropriate version of the NumPy installation package, WHL file
In the website https://pypi.python.org/pypi/numpy and Python version corresponding to WHL, see the table pyversion a column, check the version, otherwise will error not support platform
STEP7: Installation
After the preparation is done, the real numpy installation begins, into the CMD and into the WHL storage directory. If you store on D, knock on the command line.
[HTML]View PlainCopy
- D:
Then press ENTER, at this time to enter the D disk, hit the command line CD specific file name, into the WHL exist folder, such as mine is:
[HTML]View PlainCopy
- CD D:\Python34\Scripts\
Then enter the command line
[HTML]View PlainCopy
- Pip install numpy file name. WHL
STEP8: Importing NumPy to Python
Open Python.exe
Enter command line
[HTML]View PlainCopy
- From numpy Import *
STEP9: Testing
Examples of tests that cite machine learning combat:
Open Python.exe
Enter command line
[HTML]View PlainCopy
- Random.rand (bis)
Returns a random array of 4*4, because it is the random number produced, and the random number generated by the computer is entirely different.
Installation Complete ****************************************************
Most practical windows under Python+numpy installation (reprint)