Most practical windows under Python+numpy installation (reprint)

Source: Internet
Author: User

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
    1. 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
    1. 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
    1. ;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
    1. 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
    1. CD D:\Python34\Scripts\

Then enter the command line

[HTML]View PlainCopy
    1. Pip install numpy file name. WHL

STEP8: Importing NumPy to Python

Open Python.exe

Enter command line

[HTML]View PlainCopy
    1. From numpy Import *

STEP9: Testing

Examples of tests that cite machine learning combat:

Open Python.exe

Enter command line

[HTML]View PlainCopy
    1. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.