pip 备忘
- pip install --upgrade pip --user 升级pip常用命令
- pip install 库名 安装库
- pip list 查看安装的库
- pip -h 获取所用帮助信息
- pip install -U 库名 更新库
- pip uninstall 库名 卸载库
- pip show 库名 获取库详细信息
- pip search 关键词 根据关键词在名称和介绍中搜索第三方库
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple+库名 从清华大学镜像源直接安装库
- pip install -U pandas -i https://mirrors.aliyun.com/pypi/simple/ 从阿里云镜像源直接升级库
- 下面是常用镜像源:
-
镜像名称 URL 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
阿里云 http://mirrors.aliyun.com/pypi/simple
豆瓣 http://pypi.douban.com/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple
对于一些无法安装的库(未进行有效编译)可使用以下方法:
UCI界面:http://www.lfd.uci.edu/~gohlke/pythonlibs/
查找库并下载
pip install <文件路径>