第一章 基础知识(1)
安装Python
1.Windows
- 访问http://www.python.org
- 点击Download链接
- 点击Windows installer链接并且下载安装文件
- 双击下载的文件。接收默认设置,安装程序。
- 假设安装一切正常,应能在Windows的开始菜单找到新的额程序(IDLE).
2.Linx 和 Unix
绝大多数Linx和Unix的系统安装中,Python解释器已经存在了。可以在提示符小输入Python命令进行检验。
$ python
Python 2.7.3 (default, Apr 30 2012, 21:18:11)
[GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
若提示command not found
$ python
bash: python: commmand not found
这时需要自己安装python
- 使用包管理器
- 从源文件编译