Install nump with the pip command of Python

Source: Internet
Author: User

To import the script directory in the Python installation directory into the environment variable path

650) this.width=650; "title=" environment variable changed. png "alt=" Wkiol1gdbcuaxh7aaap1irittqc796.png "src=" http://s1.51cto.com/wyfs02/ M02/89/cd/wkiol1gdbcuaxh7aaap1irittqc796.png "/>


"In Windows DOS Window execution: pip

"will show information about PIP.

650) this.width=650; "title=" Pip.png "alt=" Wkiom1gdbk3hoq5uaac6e0dpfei717.png "src=" http://s2.51cto.com/wyfs02/M00 /89/cf/wkiom1gdbk3hoq5uaac6e0dpfei717.png "/>

is performed in the DOS interface in Windows: Pip install Nump

The system will automatically download the Nump package and complete the appropriate installation

650) this.width=650; "title=" Pipinstall.png "alt=" Wkiol1gdbsdhg-ukaacij34cmge518.png "src=" http://s2.51cto.com/ Wyfs02/m00/89/cd/wkiol1gdbsdhg-ukaacij34cmge518.png "/>

"Because I have installed it, so there will be no download progress bar (Note: The download is relatively slow)

Premise: You have installed the python3.5.2

"python3.5.2 download Link: Python official website

"Test Case:

# import the necessary packagesimport numpy as npdef chi2_distance ( HISTA, HISTB, EPS = 1E-10):         # compute  the chi-squared distance    d = 0.5 * np.sum ([((A  - B)  ** 2)  /  (a + b + eps)          for  (a, b)  in zip (HISTA, HISTB)])     sum =  0;    for  (A, B)  in zip (HISTA, HISTB):         E  =  ((a - b)  ** 2)  /  (a + b  + eps)         Sum += E         print Sum/2    # return the chi-squared  distance    Return dd = chi2_distance ([0,1,2,3,4],[4,3,2,1,0]) # print d 


This article is from the "11907893" blog, please be sure to keep this source http://11917893.blog.51cto.com/11907893/1869760

Install nump with the pip command of Python

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.