大家知道python如何安装模块吗?如果不知道,那就看一看python安装模块的方法,希望大家喜欢。一起来看看吧。
在安装模块之前,你首先得安装了setuptools。就可以用ez_setup.py安装了setuptools了。
有了setuptools,我们就要开始配置环境。因为你需要用到python安装目录下的Scripts文件夹里面的文件

到桌面,点击计算机右键--属性

点击“高级系统设置”

点击“环境变量”

在系统变量一栏下拉,找到PATH,双击

先在最后加一个分号;
然后再输入 “你的python路径”\\Scripts
比如我的python安装路径是D:\\python2.7.6
那么我应该输入D:\\python2.7.6\\Scripts
如图

设置完毕之后,就可以直接用命令行安装模块了。
比如我要安装PIL模块,只需要输入easy_install PIL
回车

开始下载

安装成功

以上就是python安装模块的方法,希望可以帮助到大家。