# [No000054] Windows 下Python3.5, NoteBook增强版安装

1. 安装nose

pip install nose

1. 安装numpy

pip install "#路径前缀"numpy-1.9.3+mkl-cp35-none-win32.whl

1. 下载并安装matplotlib

pip install "#路径前缀"matplotlib-1.5.0-cp35-none-win32.whl

1. 安装Scipy

pip install "#路径前缀"pyzmq-15.0.0-cp35-none-win32.whl

1. 安装sympy

#python.exe全路径# #sympy全路径#setup.py install

================================ 测试命令==============

import numpy as np

from scipy.ndimage import filters

import io

import matplotlib

import matplotlib.image as mpimg

img = np.zeros((300, 300))

img[np.random.randint(0, 300, 1000), np.random.randint(0, 300, 1000)] = 255

img2 = filters.gaussian_filter(img, 4, order=2)

import io

import matplotlib

import matplotlib.image as mpimg

from IPython import display

buf = io.BytesIO()

matplotlib.image.imsave(buf, img2, cmap="gray")

display.Image(buf.getvalue())

%pylab inline

x = linspace(0,3*pi,500)

plot(x,sin(x**2))

title("A simple chirp");

1.下载并安装Django,下载地址:https://pypi.python.org/pypi/Django/1.9rc1

#python.exe全路径# python setup.py install

3. 安装MathJax,

from IPython.external.mathjax import install_mathjax

install_mathjax()

ipython的一大特点就是支持科学计算，为了能够方便地显示数学符号、公式，需要MathJax的支持。

ok,我们玩些更好玩的:

1.IPython notebook是跟mathematica 环境相似的.可以是用Markdown写些说明啥的,不过得先选择下Markdown.

# Test

* Ipython

* 牛逼

* 很强大

$E = mc^2$

---

$$Sum(xs) = \sum_{n=0}^{len(xs)-1}xs[n]$$

- C语言版:

C

int Sum(int * nums , int n){

int s,i;

s = 0;

for(i = 0; i<n;i++){

s += nums[i];

}

return s;

}



- python版:

Python

def Sum(numbers):

"""sum doc"""

s = 0

for i in numbers:

s += i

return s



2.Image函数显示图片: 基本上是即时显示的. 在Script文件夹下放一张图片1.jpg.

from IPython.display import Image

Image (url="http://img.58cdn.com.cn/ui6/index/logo.gif")

Image(filename= "1.jpg")

⊙▂⊙..我好像被你们发现了点什么....

3.其他功能

def print_x(x):

"""测试"""

print(x)

print_x?

print_x(23)

pyzmq:并发用的,是基于消息的网络模型的东东(ZeroMQ) 单独玩也是很好玩的