1. Python Modules Installation
- Python shell: use "python py.setup install" in windows prompt; or "py.setup install" in python prompt.
- ipython notebook to launch interactive python browser.
- To install local MathJax:
from IPython.external.mathjax import install_mathjax install_mathjax()
- To install local MathJax:
- iPython shell:
- tab: complement your codes
- cd: display or change current directory
- run *.py to run a python file
- !*.py to run a python file in another process
2. Python Modules Distributions
- Python(x, y) includes python, pip, numpy, scipy, matplotlib,scikit-learn, etc.
- WinPython includes python, numpy, scipy, matplotlib, scikit-learn, etc.
- Enthought Canopy Express contains python, numpy, scipy, matplotlib, etc.
- Unofficial Windows Binaries for Python Extension Packages
- Recommend to use packed python distributions for easy installation and configuration.
- To compile and install third-party modules on our own
- easy_install, or pip installation tools (pip install module-name)
- MinGW to intall all kinds of compilers
3. Python Search Path
- Modify system path sys.path
import sys print sys.path sys.path.append('new/python/path/')
- Set PYTHONHOME to an alternative python installation directory
- Set PYTHONPATH to a list of paths which will be added to the beginning of "sys.path".
- Set PATHEXT=PATHEXT;.PY;.PYM to directly run python files *.py
- Current working directory:
import os os.getcwd() os.chdir('new dir')