1. Download and install Python2.7.6.
2. Set environment variables
Add c:\Python27 to the environment variable.
3. Download and install pip
Download get_pip.py to a directory where http://www.pip-installer.org/en/latest/installing.html # installs or upgrades the installation tool (for example, f:\get-pip.py).
Install: Enter f:\ and run:
python get-pip.py
During this process, the system will connect to the network, download the required installation package and complete the installation.
4. Set environment variables
Add c:\Python27\Scripts to the environment variable.
After completing the first four steps, you can start using Python under Windows.
1. Download and install IPython:
C: >; Pip installation ipython
The system will go online to find ipython's package, download and install it. Wait for about 5 minutes, the whole installation is completed, and pyreadline is also installed. Ipython3.exe is installed under c:\Python27\Scripts. Because path support for environment variables has been added before, you can directly enter:
C: >; ipython
2. Try the notebook and download some other products.
1) download and install pyzmq.
C: >; Pip installation pyzmq
2) download and install jinja2,
C: >; Pip installation jinja2
3) Download and install tornado,
C: >; Pip installation tornado
Ok, use the following command to start the notebook:
C: >; Ipython notebook
If it appears,
ImportError: There is no module named notebook.notebookapp.
rule
Pip installation jupyter
3. Try matplotlib, a drawing tool for scientific calculation.
1) download and install nose.
C: >; Pip mounting nose
2) download numpy-1.1.1+mkl-cp27-cp27m-win _ amd64.whl to f:\
f:& gt; Pip installs numpy-1.1.1+mkl-cp27-cp27m-win _ amd64.whl. Numpy and mkl will be installed in this step.
3) install matplotlib-1.2.0.win-amd64-py3.3.exe.
4) Install Scipy. Download Scipy-0. 13.2. Win-amd64-py3.3.exe is from this website in http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy-stack..
Well, that's it.
5) Run ipython notebook (if it appears).
AttributeError:' module' object has no attribute' PY2'
Execute pip unloading 6; Pip installed six; Reinstall six, and you're done
=====================================
In your notebook, try the following procedure:
================================
Import numpy as np.
Import filters from scipy.nimage.
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
img 2 = filters . Gaussian _ filter(img,4,order=2)
Import io
Import matplotlib
Import matplotlib.image as mpimg.
Import display from IPython
buf = io。 Byte order ()
matplotlib.image.imsave(buf,img2,cmap="gray ")
Show. Image(buf.getvalue())