您的位置:首页 > 编程语言 > Python开发

Python安装第三方模块

2018-02-19 13:15 393 查看
1、安装whl模块
通过 "pip list" 命令查看已安装的模块
#安装
(1)、将待安装的whl模块整理好安装顺序保存到 "requirements.txt",然后执行 "pip install -r requirements.txt" 进行快速安装。
(2)、执行 pip install xxx.whl 进行单个whl的安装
#whl安装时提示 "***  is not a supported wheel on this platform"
在Python中执行以下代码,查看支持的whl命名:import pip

print(pip.pep425tags.get_supported())
打印出tuple的List,需要将whl文件重命名为受支持的命名。如Python 3.5安装cx_Oralce时: cx_Oracle-6.1-cp35-cp35m-win_amd64.whl 改名为 cx_Oracle-6.1-cp35-none-win_amd64.whl

2、源码安装
使用pip install -e 命令。第三个参数为源码所在路径,如 "./networkx-2.1"pip install -e ./networkx-2.1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: