模块分为三种:
- 自定义模块
- 内置模块
- 开源模块
# python 安装第三方模块
# 加入环境变量 : 右键计算机---属性---高级设置---环境变量---path--分号+python的scripts路径
(1) python管理工具 pip
# python3 -m pip install requests # 3版本安装
(2) 源码安装
解压
cmd
进到包路径
python setup.py install
windows下安装第三方模块---报错
如果找不到pip命令可以去scripts目录下 安装报错 C:\Python35\Scripts λ pyip install django Fatal error in launcher: Unable to create process using '"' C:\Python35\Scripts λ pip install django Fatal error in launcher: Unable to create process using '"' 解决 python -m pip install package C:\Python35\Scripts λ python -m pip install requests Collecting requests Downloading requests-2.10.0-py2.py3-none-any.whl (506kB) 100% |████████████████████████████████| 507kB 144kB/s Installing collected packages: requests Successfully installed requests-2.10.0 You are using pip version 7.1.2, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. C:\Python35\Scripts λ piython -m pip install django Collecting django Downloading Django-1.9.6-py2.py3-none-any.whl (6.6MB) 100% |████████████████████████████████| 6.6MB 64kB/s Installing collected packages: django Successfully installed django-1.9.6 You are using pip version 7.1.2, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. C:\Python35\Scripts λ python3 -m pip install django Collecting django Using cached Django-1.9.6-py2.py3-none-any.whl Installing collected packages: django Successfully installed django-1.9.6 You are using pip version 7.1.2, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.