Python简明教程:Python 安装各个模块
2018-04-04 本文已影响7人
老友旧巷
pip安装
pip是一款非常方便的python包管理工具,它相当于一个应用市场,你可以通过它下载你需要的模块。
1.下载pip 9.0.1 下载地址:http://files.cnblogs.com/files/Jacklovely/pip-9.0.1.tar.gz
![](https://img.haomeiwen.com/i9552257/7748cdb53b5d3517.png)
2.解压
![](https://img.haomeiwen.com/i9552257/4f47a83018149263.png)
3.然后进入该目录,你会看到如下内容:
![](https://img.haomeiwen.com/i9552257/c4d2badf4738f4de.png)
4.打开CMD,执行命令:python setup.py install
![](https://img.haomeiwen.com/i9552257/d213a1359bab9544.png)
![](https://img.haomeiwen.com/i9552257/49d07046b82e9ca0.png)
5.查看
![](https://img.haomeiwen.com/i9552257/4a3dabc9021a6ce8.png)
查看pip版本。当你需要升级pip版本的时候可以执行命令:python -m pip install -U pip 即可。
接下来你安装所需模块就会变得很简单,超级简单。
比如安装 pygame 模块:
![](https://img.haomeiwen.com/i9552257/269cfbe32ac4886b.png)
比如安装 pyMySQL 模块:
![](https://img.haomeiwen.com/i9552257/53c7fbe04619a235.png)
安装成功的模块在
![](https://img.haomeiwen.com/i9552257/c3159792718f2333.png)
你还可以在PyCharm中进行安装相应模块:
![](https://img.haomeiwen.com/i9552257/440a27f49ab7a3f2.png)
至此,可以使用你安装的各个模块了。
![](https://img.haomeiwen.com/i9552257/2d6d695c9c3285d8.png)
Then,that’s all,thank you。