zoukankan      html  css  js  c++  java
  • linux软件管理之python包管理

    Python包管理


    ====================================================================================
    python ------ rpm
    pip ------ yum

    安装setuptools


    [root@localhost ~]# yum -y install git
    [root@localhost ~]# git clone https://github.com/pypa/setuptools.git
    [root@localhost ~]# cd setuptools
    [root@localhost ~]# python setup.py install


    实时解析nginx 访问日志ngxtop


    1. 源码安装
    [root@localhost ~]# wget https://github.com/lebinh/ngxtop/archive/master.zip -O ngxtop-master.zip
    [root@localhost ~]# unzip ngxtop-master.zip
    [root@localhost ~]# cd ngxtop-master
    [root@localhost ~]# python setup.py install

    2. nginx 基本示例
    [root@localhost ~]# ngxtop -c /usr/local/nginx/conf/nginx.conf //实时状态
    [root@localhost ~]# ngxtop -c /usr/local/nginx/conf/nginx.conf top remote_addr //top 10


    安装pip软件包


    [root@localhost ~]# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
    [root@localhost ~]# tar -xzvf pip-1.5.4.tar.gz
    [root@localhost ~]# cd pip-1.5.4
    [root@localhost ~]# python setup.py install


    使用pip安装软件包


    1. 安装软件包
    [root@localhost ~]# pip install SomePackage

    2. 检查哪些包需要更新
    [root@localhost ~]# pip list --outdated

    3. 升级软件包
    [root@localhost ~]# pip install --upgrade SomePackage

    4. 卸载软件包
    [root@localhost ~]# pip uninstall SomePackage

    pip 安装redis 实战案例


    [root@localhost ~]# pip install redis





  • 相关阅读:
    【数据结构(C语言版)系列三】 队列
    【数据结构(C语言版)系列二】 栈
    【数据结构(C语言版)系列一】 线性表
    [转]Boosting
    吴恩达机器学习笔记
    C语言之图像旋转
    DP【洛谷P4290】 [HAOI2008]玩具取名
    背包 DP【洛谷P4158】 [SCOI2009]粉刷匠
    最短路+状压DP【洛谷P3489】 [POI2009]WIE-Hexer
    模板 Trie树
  • 原文地址:https://www.cnblogs.com/anttech/p/10612378.html
Copyright © 2011-2022 走看看