NumPy學習筆記 一

NumPy學習筆記 一

  《NumPy學習筆記》系列將記錄學習NumPy過程當中的動手筆記,前期的參考書是《Python數據分析基礎教程 NumPy學習指南》第二版、《數學分析》第四版(華東師範大學數學系)、《機率論與數理統計》(陳希孺,中科大出版)、《機率論與數理統計》第二版(茆詩鬆、程依明等編)、《組合最優化:理論與方法》(現代數學譯叢23)。筆記一主要記錄NumPy&SciPy及相關軟件的環境準備部分。php

    NumPy的官方網站上(http://www.numpy.org/詳細介紹了三種安裝NumPy&SciPy的方法(https://www.scipy.org/scipylib/download.html):html

一. 官方源碼及二進制發佈python

Projectlinux

Available packagesgit

Download locationgithub

NumPyweb

Official source code (all platforms) and binariesfor Windows, Linux and Mac OS Xubuntu

PyPI page for NumPyapp

SciPysvn

Official source code (all platforms) and binariesfor Windows, Linux and Mac OS X

SciPy release page (sources)

PyPI page for SciPy (all)

 

  推薦使用Python pip來安裝,簡單,而且獲取的是最新的發佈版。

 

  如下命令在ubuntu 17.10上安裝NumPy&SciPy

 

   sudo apt install python3-pip

   pip3 install numpy

   pip3 install scipy

 

 

  . 訪問源代碼倉庫

NumPySciPy的官方倉庫都在Github上。

檢出最新的NumPy源碼:

git clone https://github.com/numpy/numpy.git

檢出最新的SciPy源碼:

git clone https://github.com/scipy/scipy.git

 

編譯參考:https://docs.scipy.org/doc/scipy-dev/reference/building/index.html

 

   . 第三方/供應商 包管理器

  下面是部分第三方和操做系統供應商包管理器包含的NumPySciPy

 

Distribution

NumPy Packages

SciPy Packages

Arch Linux

python-numpy

python-scipy

Debian GNU/Linux

python-numpy

python-scipy

Ubuntu Linux

python-numpy

python-scipy

Fedora

numpy

scipy

Fink

numpy-py27, numpy-py35

scipy-py27, scipy-py35

FreeBSD (Ports)

math/py-numpy

science/py-scipy

Gentoo Linux

dev-python/numpy

sci-libs/scipy

MacPorts

py-numpy,

py-scipy,

NetBSD (pkgsrc)

math/py-numpy

math/py-scipy

OpenSUSE

python-numpy, python-numpy-devel

python-scipy, python-scipy-devel

Slackware Linux

numpy (slackbuilds.org)

scipy (slackbuilds.org)

 

  在Ubuntu 17.10上安裝經過apt包管理器安裝

     sudo apt install num-py

     sudo apt install python-numpy

 

  不推薦使用該種方式,由於獲取的軟件版本每每較低。

 

安裝matplotlibipython,一樣推薦使用pip安裝

pip3 install matplotlib

pip3 install ipython
相關文章
相關標籤/搜索