Download install Setuptool and pip Linux installation pip _python

Source: Internet
Author: User

Copy Code code as follows:

#! /bin/bash
Files_url= (https://pypi.python.org/packages/source/s/setuptools/setuptools-2.1.tar.gz#md5= 2044725530450d0517393882dc4b7508 https://pypi.python.org/packages/source/p/pip/pip-1.5.tar.gz)
files= (setuptools PIP)

packages_dir=/data/packages/temp/

if [!-D $packages _dir]
Then
Mkdir-p $packages _dir
Fi

Downfile () {
    count=0
    for I on ${files_url[*]}
    do
            wget $i-o $packages _dir${files[$count]} ". Tgz "
            tar xvzf $packages _dir${files[$count]} ". tgz"-C $packages _dir
            count=$ (($count + 1))
    done
}

Installfile () {
For z in $ (ls $packages _dir)
Todo
pacname=$ (tar tf $packages _dir/$z | head-1 | cut-d/F 1)
Tar xvzf $packages _dir$z-c $packages _dir
Python $packages _dir$pacname/setup.py Install
Done
}
Downfile
Installfile
Echo-e "#############"
Echo-e "#python ok#"
Echo-e "#############"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.