- 时间:2021-05-23 12:58 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:Python中pip安装非PyPI官网第三方库的方法
在python中安装非自带python模块,有三种方式:
1.easy_install
2.pip
3.下载压缩包(.zip, .tar, .tar.gz)后解压, 进入解压缩的目录后执行python setup.py install命令
本文主要针对pip安装时可能会碰到的一种情况,及解决办法:
假如我要安装pylint模块,该模块非python自带模块,用import肯定不能导入,需要额外安装
[url=https://github.com/pypa/pip/blob/c2361e72da2c31a3596d49dc5fccb7d2bdb8c032/CHANGES.txt#L12-L15]changelog[/url]里面查看更改的信息
2. 可以用pip --version来查看pip的版本信息
[url=http://www.logilab.org/project/pylint]下载包地址[/url]<<<
3. 执行pip -h命令查看更新pip相关的帮助信息
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
bundle DEPRECATED. Create pybundles.
help Show help for commands.
General Options:
-h, --help Show help.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only logs failures. This log is active by default at pip.log.
--log <path> Path to a verbose appending log. This log is inactive by default.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle.
微信版

扫一扫进微信版
返回顶部