zoukankan      html  css  js  c++  java
  • 手把手从python安装到setuptools、pip工具安装

    一、python安装
    1、基础开发库

    apt-get install gcc
    apt-get install openssl libssl-dev

    2、安装数据库和开发库

    apt-get install mysql-server libmysqld-dev

    3、python环境

    下载地址:https://www.python.org/downloads/

    tar -xvf Python-2.7.10.tar.xz

    cd Python-2.7.10/

    ./configure --prefix=/opt/python2.7

    make

    make install

    echo "export PATH=/opt/python2.7/bin:$PATH" > /etc/profile.d/python.sh

    echo $PATH

    which python

    mkdir ~/.python-eggs

    chmod +w ~/.python-eggs

    echo "export PATH=/opt/python2.7/bin:$PATH" > /etc/profile.d/python.sh

    export PATH=/opt/python2.7/bin:$PATH

    二、setuptools安装
    要使用easy_install工具,那么需要安装setuptools,方式如下:

    下载地址:

    https://pypi.python.org/pypi/setuptools   

    https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip

    方式如下:

    unzip setuptools-28.8.0.zip

    cd setuptools-28.8.0/

    /opt/python2.7/bin/python ./setup.py install

    四、pip安装
    /opt/python2.7/bin/pip install -r ./requirements.txt

    wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
    python get-pip.py

  • 相关阅读:
    2021/6/28
    2021/6/25
    IDEA快捷键
    maven的一些问题
    Maven安装
    2021/6/14
    nmcli 网络管理工具
    linux yum仓库配置
    linux 防火墙selinux ,firewalld, iptables
    linux root密码重置
  • 原文地址:https://www.cnblogs.com/xuzhongtao/p/10234272.html
Copyright © 2011-2022 走看看