`
zhb8015
  • 浏览: 390952 次
  • 性别: Icon_minigender_1
  • 来自: 北京
博客专栏
Group-logo
Spring Roo杂谈
浏览量:0
社区版块
存档分类
最新评论

what's pip (转)

阅读更多

pip命令

pip的意思是破蛋而出,继承了python的思维,呵呵~python的包有以egg命名的,意思是蛇蛋,如此便自然而然的明白如此命名的原因。

 

pip用来安装和管理python包的命令,可以代替easy_install。

用法:

1、安装python包

 

[python] view plaincopy
 
  1. $ pip install simplejson  
  2. [... progress report ...]  
  3. Successfully installed simplejson  

2、升级包

 

 

[python] view plaincopy
 
  1. $ pip install --upgrade simplejson  
  2. [... progress report ...]  
  3. Successfully installed simplejson  

3、删除包

[python] view plaincopy
 
  1. $ pip uninstall simplejson  
  2. Uninstalling simplejson:  
  3.   /home/me/env/lib/python2.7/site-packages/simplejson  
  4.   /home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info  
  5. Proceed (y/n)? y  
  6.   Successfully uninstalled simplejson  


4、从指定文件中安装指定的包、模块

 

 

[python] view plaincopy
 
  1. pip install -r requirements.txt  
  2.   
  3. requirements.txt中的格式是:  
  4.   
  5. django-coverage==1.2.2  
  6. django-permissions==1.0.3  
  7. django-workflows==1.0.2  
  8. django==1.3.1  
  9. MySQL-python==1.2.3  
  10. python-krbV==1.0.90  
  11. South==0.7.5  



关于pip的更多详细信息,请见http://www.pip-installer.org/en/latest/

 

Ubuntu下安装pip的方法
 
安装pip的方法:
Install pip and virtualenv for Ubuntu 10.10 Maverick and newer
 
$ sudo apt-get install python-pip python-dev build-essential 
$ sudo pip install --upgrade pip 
$ sudo pip install --upgrade virtualenv 
For older versions of Ubuntu
 
Install Easy Install
$ sudo apt-get install python-setuptools python-dev build-essential 
Install pip
$ sudo easy_install pip 
Install virtualenv
$ sudo pip install --upgrade virtualenv 
 
安装mysql拓展包可以:sudo pip install mysql-python
安装其他的包只要pip + 包的名字 就行了 很方便。而且安装完的mysqlib用起来没一点问题,
windows下还要修改下源文件。写程序还是在linux下好啊。
安装mysql 
apt-get install mysql-server
分享到:
评论

相关推荐

    ask:python中的简单输入验证

    Input here (Only accepts integers)>>> askString("What's your name?")What's your name?# Input here>>> askChar('Do you want to proceed?', ['y','n'])Do you want to proceed? (y/n)# Input

    Python安装配置详解

    此外,考虑到Python的包管理和虚拟环境管理,可能需要安装一些额外的工具,如pip(Python包安装器)和virtualenv(用于创建虚拟环境的工具)。 在使用Python进行开发时,用户还需要了解一些基础的Python编程概念,...

    whatson:具有多个日历的跨平台日历,可以轻松导出到 3rd 方服务

    最新动态What's On 是格拉斯哥大学的 Web 应用程序开发 2 项目。 什么是跨平台日历,它使用户能够添加多个日历,每个特定于特定事件,例如大学时间表或锻炼时间表到一个可管理的日历界面。运行应用程序的说明要将此...

    VividHues:VividHues是Python控制台中用于彩色字符串的轻量级Python软件包!

    生动的色彩 :rainbow: :package: VividHues是Python控制台中用于彩色字符串的轻量级Python软件包!... COLOUR + "What's your name? \n \t --> " + Clr . RESET ) # For input() use plusses, not commas!

    PyPI 官网下载 | whatshap-0.12.tar.gz

    它的全称是"WhAT'S haplOpe",是一个用于处理高覆盖率测序数据的工具,特别适用于进行长片段重测序数据的haplotype assembly。这个库提供了高效的算法,能够在未知遗传变异的情况下,帮助研究人员推断出个体的完整...

    leetcode下载-Learning:这是我学到的东西的存储库

    It's the repository of things that I learned... Python branch What I've learned in python [Lil-tool] ascii.py 一个可以把图片转换成简单字符画的小工具,转自实验楼 -使用方法 安装pillow sudo pip3 install ...

    python3.6.5参考手册 chm

    What’s New in Python What’s New In Python 3.6 Summary – Release highlights New Features PEP 498: Formatted string literals PEP 526: Syntax for variable annotations PEP 515: Underscores in ...

    cloudformation-cli-python-plugin:CloudFormation Provider开发工具包Python插件可让您基于输入模式自动生成Python代码

    AWS CloudFormation资源提供程序Python插件 CloudFormation CLI(cfn)允许您编写自己的资源提供者,供CloudFormation使用。 此插件库有助于提供Python运行时绑定,以通过...What's the name of your resource typ

    Python-ChatterBot是一个能够自我训练学习多种语言的聊天机器人

    response = chatbot.get_response("What's your name?") print(response) ``` 此外,ChatterBot提供了多种适配器(adapters),如`MongoDatabaseAdapter`用于存储和检索对话历史,以及`WebChatAdapter`用于创建一个...

    sumy:用于自动汇总文本文档和HTML页面的模块

    $ sumy lex-rank --length=10 --url=http://en.wikipedia.org/wiki/Automatic_summarization # what's summarization?$ sumy luhn --language=czech --url=http://www.zdrojak.cz/clanky/automaticke-zabe

    sphinxcontrib-quizdown:quizdown.js的sphinx扩展

    狮身人面像测验 Sphinx扩展名。 直接在您的内容中编写测验或包括外部.md文件。 在尝试quizdown。 安装 首先,使用以下命令安装库: ... > It's the largest city in Germany. - [x] Berlin - [ ] Co

    python twisted server端例子

    self.sendLine("What's your name?") def connectionLost(self, reason): if self.name in self.users: del self.users[self.name] ``` - `connectionMade()` 方法:当客户端连接到服务器时被调用,询问用户名称...

    instagram-auto-dm:使用Python程序发送自动DM

    What's up ?") # Messege that you want to send [line:53] usrnames = ['instagram', 'twitter'] # username whom you will send the message [line:11] 确保已安装Chrome,并且$PATH上提供了与Chrome版本匹配...

    python pandas说明文档

    #### 二、新特性介绍 (What's New) 在 Pandas 0.18.0 版本中,主要的新特性包括: - **性能优化**:对 DataFrame 和 Series 的内存使用进行了优化,减少了内存消耗。 - **API 改进**: - 添加了 `.str.split()` ...

    msgpack-python-0.4.2.tar

    What's this ------------ `MessagePack <http://msgpack.org/>`_ is a fast, compact binary serialization format, suitable for similar data to JSON. This package provides CPython bindings for reading and...

    matplotlib 使用手册

    在"What’s new in Matplotlib"部分,可能会介绍在当前版本Matplotlib 2.2.0中引入的新特性和改进。这包括新增的API功能、对现有功能的增强以及性能上的优化。 "GitHub Stats"部分可能展示matplotlib在GitHub上的...

    PyPI 官网下载 | rasa_nlu-0.9.1.tar.gz

    - what's the best sushi place? entities: - cuisine - number_of_people ``` **模型训练与评估** 使用`rasa_nlu.train`命令,提供训练数据和配置文件,Rasa NLU 将训练一个模型。训练完成后,可以使用`rasa_...

    lindo 应用的一些资料

    该软件主要用于解决线性规划(LP)、二次规划(QP)等运筹学问题,其系列产品包括Lindo、LINGO以及LINDO API和What's Best!,适用于不同规模和复杂度的优化模型。 **运筹学问题优化模型** 运筹学问题通常以数学规划的...

    django-cymysql:带有mysql的django mysql数据库后端

    $ pip install "django-cymysql>=x.y,<x xss=removed> create database some_what_database default character set utf8; 设定值 DATABASES = { 'default': { 'ENGINE': 'mysql_cymysql', 'NAME': 's

Global site tag (gtag.js) - Google Analytics