pip常用命令(转载)
用阿里云服务器,使用pip安装第三方库的时候卡的要死。所以我就想pip能不能安装本地的包。
找到了这篇博客:
http://me.iblogc.com/2015/01/01/pip%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/
原来pip能干这么多事情!幸福感暴涨!
基本的命令解释,如下图:
安装
sudo easy_install pip
列出已安装的包
pip freeze or pip list
导出requirements.txt
pip freeze > <目录>/requirements.txt
安装包
在线安装
pip install <包名> 或 pip install -r requirements.txt
通过使用== >= <= > <来指定版本,不写则安装最新版
requirements.txt内容格式为:
APScheduler==2.1.2
Django==1.5.4
MySQL-Connector-Python==2.0.1
MySQL-python==1.2.3
PIL==1.1.7
South==1.0.2
django-grappelli==2.6.3
django-pagination==1.0.7
安装本地安装包
pip install <目录>/<文件名> 或 pip install --use-wheel --no-index --find-links=wheelhouse/ <包名>
<包名>前有空格
可简写为
pip install --no-index -f=<目录>/ <包名>
卸载包
pip uninstall <包名> 或 pip uninstall -r requirements.txt
升级包
pip install -U <包名>
或:pip install <包名> --upgrade
升级pip
pip install -U pip
显示包所在的目录
pip show -f <包名>
搜索包
pip search <搜索关键字>
查询可升级的包
pip list -o
下载包而不安装
pip install <包名> -d <目录> 或 pip install -d <目录> -r requirements.txt
打包
pip wheel <包名>
更换国内pypi镜像
国内pypi镜像
- 阿里:
https://mirrors.aliyun.com/pypi/simple - 中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/
指定单次安装源
pip install <包名> -i https://mirrors.aliyun.com/pypi/simple
指定全局安装源
在unix和macos,配置文件为:$HOME/.pip/pip.conf
在windows上,配置文件为:%HOME%\pip\pip.ini
[global]
timeout = 6000
index-url = https://mirrors.aliyun.com/pypi/simple
pip常用命令(转载)的更多相关文章
- Windows下python 3 pip程序升级异常问题及pip常用命令
最近在学习,Selenium+Python自动化,在安装selenium包的时候,出现无法安装的情况,并提示Pip有新的版本,我的版本太低了.然后安装系统提示操作,pip升级也出现异常,报错timeo ...
- ubuntu源与常用python配置pip源(win)、pip常用命令
pip常用命令 ubuntu更新系统源 首先备份/etc/apt/sources.list mv /etc/apt/sources.list /etc/apt/sources.list.bak 然后下 ...
- pip 常用命令小结
pip 常用命令小结 pip这个工具我们经常会用到,毕竟python 是一门以第三方库庞大而著名的编程语言,所以我们总会用pip 安装一些依赖库,当然这只是pip 最常用的一个命令,下面就来介绍一下 ...
- Maven常用命令(转载)
Maven库: http://repo2.maven.org/maven2/ Maven依赖查询: http://mvnrepository.com/ Maven常用命令: 1. 创建Maven的普通 ...
- mongo的常用命令--转载
转载liyonghui的博文,出处 http://www.cnblogs.com/liyonghui/p/mongodb.html 博主写的特别好,对于我这个新手帮了大忙了,还将mongo和mysq ...
- adb 常用命令-转载
转自:https://blog.csdn.net/suxing_ing/article/details/54907860 显示当前运行的全部模拟器:adb devices 获取序列号:adb get- ...
- python pip常用命令
pip安装命令: pip install packagename pip显示模块版本号: pip show packagename pip卸载模块: pip uninstall packagename ...
- MYSQL常用命令(转载)
1.导出整个数据库 mysqldump -u 用户名 -p --default-character-set=latin1 数据库名 > 导出的文件名(数据库默认编码是latin1)mysqldu ...
- Linux查看日志常用命令(转载)
转自: https://www.cnblogs.com/kbkiss/p/7567725.html -------------------------------------------------- ...
- [python]pip常用命令(转载)
用阿里云服务器,使用pip安装第三方库的时候卡的要死.所以我就想pip能不能安装本地的包. 找到了这篇博客: http://me.iblogc.com/2015/01/01/pip%E5%B8%B8% ...
随机推荐
- 【Python】异常
捕获异常 try: num = int(input("请输入一个整数:")) result = 8 / num print(result) except ValueError: p ...
- Windows系统Apache下载和安装
一.Apache的下载 1.访问Apache官网:https://httpd.apache.org 2.选择Windows版本下载 3.下载完成后解压缩,把文件放到自己想放的盘 二.Apache的安装 ...
- rancheros在vm主机部署
问题描述: 容器化,越来越重要.在云服务中很大比例的服务都跑在容器中,今天介绍rancheros基于容器的os. 特点: 启动快,比较小系统服务也是基于容器化 使用最新的docker release ...
- Kubectl Rollout 回滚及Autoscale自动扩容
Kubectl Rollout 回滚及Autoscale自动扩容 Kubernetes 中采用ReplicaSet(简称RS)来管理Pod.如果当前集群中的Pod实例数少于目标值,RS 会拉起新的Po ...
- linux设备驱动程序--串行通信驱动框架分析
linux 串行通信接口驱动框架 在学习linux内核驱动时,不论是看linux相关的书籍,又或者是直接看linux的源码,总是能在linux中看到各种各样的框架,linux内核极其庞杂,linux各 ...
- composer.json详解
composer.json 架构:https://docs.phpcomposer.com/04-schema.html#homepage composer.json 完全解析:https://lea ...
- pip的安装、以及使用方法。
pip类似RedHat里面的yum,安装Python包非常方便.本节详细介绍pip的安装.以及使用方法. 1.pip下载安装 1.1 pip下载 1 # wget "https://py ...
- Codeforces C. Split a Number(贪心大数运算)
题目描述: time limit per test 2 seconds memory limit per test 512 megabytes input standard input output ...
- pandas 常用方法使用示例
from pandas import DataFrame import numpy as np import pandas as pd t={ , , np.nan, , np.nan, ], &qu ...
- Boosting and AdaBoost
Boosting是一种从一些弱分类器中创建一个强分类器的集成技术(提升算法). 它先由训练数据构建一个模型,然后创建第二个模型来尝试纠正第一个模型的错误.不断添加模型,直到训练集完美预测或已经添加到数 ...