Python PIP包管理器
版权所有,未经许可,禁止转载
章节
- Python 介绍
- Python 开发环境搭建
- Python 语法
- Python 变量
- Python 数值类型
- Python 类型转换
- Python 字符串(String)
- Python 运算符
- Python 列表(list)
- Python 元组(Tuple)
- Python 集合(Set)
- Python 字典(Dictionary)
- Python If … Else
- Python While 循环
- Python For 循环
- Python 函数
- Python Lambda
- Python 类与对象
- Python 继承
- Python 迭代器(Iterator)
- Python 模块
- Python 日期(Datetime)
- Python JSON
- Python 正则表达式(RegEx)
- Python PIP包管理器
- Python 异常处理(Try…Except)
- Python 打开文件(File Open)
- Python 读文件
- Python 写文件
- Python 删除文件与文件夹
PIP是什么?
PIP是Python的包管理器,就像Java中的Maven。
注意: 如果是Python 3.4或更高版本,默认包含PIP。
什么是包?
一个包包含了一个模块的全部文件。
模块是Python代码库,可以在项目中导入、使用的。
检查是否安装了PIP
命令行中执行以下命令:
Kevin@KEVIN-PC C:\Users\Kevin
> pip --version
pip 19.0.3 from d:\program files\python\lib\site-packages\pip (python 3.7)
下载一个包
下载包非常简单。
打开命令行工具,执行pip install 包名
命令:
示例
下载一个名为“camelcase”的Python包:
Kevin@KEVIN-PC C:\Users\Kevin
> pip install camelcase
使用一个包
一旦安装了包,就可以使用它了。
将“camelcase”包导入到项目中。
示例
导入并使用“camelcase”:
import camelcase
c = camelcase.CamelCase()
txt = "long time no see"
print(c.hump(txt))
查找包
更多包请访问 https://pypi.org/。
删除包
可使用uninstall
命令删除一个包:
示例
卸载名为“camelcase”的包:
Kevin@KEVIN-PC C:\Users\Kevin
> pip uninstall camelcase
删除包过程中,将确认是否真要删除:
Uninstalling camelcase-0.2:
Would remove:
d:\program files\python\lib\site-packages\camelcase-0.2-py3.7.egg-info
d:\program files\python\lib\site-packages\camelcase\*
Proceed (y/n)? y
Successfully uninstalled camelcase-0.2
按下y
键,确认删除。
列出包
使用list
命令列出系统上安装的包:
示例
列出系统上安装的包:
Kevin@KEVIN-PC C:\Users\Kevin
> pip list
输出结果:
> pip list
Package Version
---------- -------
pip 19.0.3
setuptools 40.8.0
Python PIP包管理器的更多相关文章
- python pip包管理器安装
下载 http://peak.telecommunity.com/dist/ez_setup.py 执行:python ez_setup.py 下载: http://pypi.python.or ...
- Python pip包管理器安装第三方库超时解决方案
一.国内镜像安装 使用方法:pip install --index 镜像网站 第三方库名 二.镜像网站 http://pypi.douban.com/simple/ 豆瓣 http://mirrors ...
- windows下python的包管理器pip安装
pip: A tool for installing and managing Python packages. 要用到第三方包,python的版本就必须是2.7 https://pypi.pyth ...
- python pip包管理
pip 是一个安装和管理 Python 包的工具 , 是 easy_install 的一个替换品.本文将详细说明 安装 pip 的方法和 使用 pip 的一些基本操作如安装.更新和卸载 python ...
- 【Python系列】Python包管理器pip
缘起 这段时间忙着给朋友搞事,忙了好长一段时间,木有写博客很长时间了.之间做了两个东西,一个是邮件自动发送脚本,一个是数据处理软件.其中,在做数据处理软件的时候使用到了非Python系统库,是两个第三 ...
- nodejs,python,sublime和Eclipse的包管理器
Python的包管理器叫pip. 首先安装Python运行环境Python 3.7.0:https://www.python.org/downloads/release/python-370/ Pyt ...
- Python的包管理工具Pip (zz )
Python的包管理工具Pip 接触了Ruby,发现它有个包管理工具RubyGem很好用,并且有很完备的文档系统http://rdoc.info 发现Python下也有同样的工具,包括easy_ins ...
- 使用腾讯云提供的针对Nuget包管理器的缓存加速服务
继阿里巴巴开源镜像站(https://opsx.alibaba.com/).华为云镜像站点(https://mirrors.huaweicloud.com/ )之后,腾讯也已于近日上线了类似的服务,官 ...
- Bower => 前端开发也有包管理器
摘要: 一直以来npm,pip等各种包管理器好像都和前端开发没什么太大关系,当然因为nodejs的原因可能感觉npm会亲切一些,不过终归不是针对客户端的包管理工作,所以Bower的出现确实让人眼前一亮 ...
随机推荐
- 2_02_MSSQL课程_where查询和like模糊查询
1.where 条件过滤 常见的表达式过滤:比如: select * from 表 where Id>10; 多条件过滤: and or not (优先级:not > and > ...
- Python学习第四课——基本数据类型一之int and str
1.数字(int) - int() 方法 # 定义 a1=123 a2=456 #功能1:将字符串转换为数字 #例子1: a = " print(type(a)) # type()为查看类型 ...
- Bootstrap入门(一)准备
Bootstrap入门(一)准备 网页的样式化与布局展示是很多开发者要面对的问题,目前有多的框架和工具包,可以使网页设计的任务变得更加简单.轻松.方便.快捷一些,其中,bootstra ...
- Day3-E-New Year Snowmen CodeForces140C
As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. ...
- Day2-M-Prime Ring Problem-HDU1016
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle ...
- 【高软作业2】:Java IDE调研分析
一 序言 随着软件项目开发需求的增多,拥有一款优秀的.顺手的IDE(Integrated Development Environment)对程序员来说显得格外重要.本文就Java程序开发,选择了3款I ...
- leetcode236 Lowest Common Ancestor of a Binary Tree
""" Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in ...
- Echarts学习宝典
1,可以使用百度图说中的图表代码复制到option中,还可在百度图说中以可视化的方式编辑数据,调整参数和编辑样式.(也可借助百度图说更改部分样式) 2,借助网站 https://echarts.bai ...
- 吴裕雄 Bootstrap 前端框架开发——Bootstrap 按钮:内嵌下拉菜单的按钮组
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- C语言常用函数
一.数学函数 调用数学函数时,要求在源文件中包下以下命令行: #include <math.h> 函数原型说明 功能 返回值 说明 int abs( int x) 求整数x的绝对值 计算结 ...