现在大部分的教程,都会要求直接安装Anaconda 和Pycharm,虽然pycharm是非常优秀的python IDE生产工具,但是对于新手来说配置比较繁琐,并不友好,而且国考计算机二级,只能用python自带的idle,用pip包管理安装python的各种包也是常规考核操作。
下面是python解释器的安装过程,另外在我的资源分享区,也有关于安装的word文档,感兴趣的小伙伴可以去自行下载。
安装文件下载位置:
Python解释器有两个重要的工具:
IDLE:Python集成开发环境,用来编写和调试Python代码;
Pip:Python第三方库安装工具,用来在当前计算机上安装第三方库
下载完安装包双击开始安装,注意安装过程有一项把python加入系统路径,一定要勾选!!
安装完成后,屏幕点击左下角开始键,找到python如下:
第一个就是我们将要使用工具IDLE,它完全是用python基本库的tkinter编写的。
第二个是python的命令行工具,可以在里面交互的调试代码。
第三个是chm格式的python文档,都是英文,想看的小伙伴可以去我的共享区下载中文版本的官方文档。
第三个点击后将会有一个网页形式的模块api网页,可以看看哦python的基本库组成。
其他的不用管,先看看我们idle:
我们也可通过windows的命令行,快速的打开交互调试模式,而不用去点击
按下 win+r组合键,输入cmd进入win命令行,或者直接输入python进入python交互解释器
这里我们直接进入win命令行,为了学习pip包管理。
由于我的命令行界面改了背景色,可能和你们的不太一样,在命令行下输入pip 或者pip -h
出现如下内容pip的命令格式和帮助文档,我们来看一下。
Usage:
pip <command> [options] #格式 pip 命令 选项部分(选项可以为空)
Commands:#命令部分
install #重要 Install packages.
download Download packages.
uninstall #重要 Uninstall packages.
freeze Output installed packages in requirements format.
list #重要 List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip's wheel cache.
index Inspect information available from package indexes.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.
General Options:#选项部分
-h, --help Show help.
--debug Let unhandled exceptions propagate outside the main
subroutine, instead of logging them to stderr.
--isolated Run pip in an isolated mode, ignoring environment
variables and user configuration.
--require-virtualenv Allow pip to only run in a virtual environment; exit
with an error otherwise.
-v, --verbose Give more output. Option is additive, and can be used up
to 3 times