安装Python-Jenkins

有两种方式安装:
①有网络:sudo pip install python-jenkins
②无网络:
下载文件:https://pypi.org/project/python-jenkins/#files后执行
python setup.py install
============================================================================
一、升级到2.7
]# yum -y install  zlib zlib-devel openssl openssl-devel  sqlite-devel
]# wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
]# tar -jxvf Python-2.7.3.tar.bz2
]# cd Python-2.7.3
]# ./configure    --prefix=/usr/local/python2.7
]# make && make install
]# cd /usr/bin/
]# ll | grep python
-rwxr-xr-x.   2 root root      4864 Nov 22  2013 python
lrwxrwxrwx.   1 root root         6 Jan 16  2014 python2 -> python
-rwxr-xr-x.   2 root root      4864 Nov 22  2013 python2.6
]# mv python python2.6.bak
]# ln -s /usr/local/python2.7/bin/python /usr/bin/python
]# vi /usr/bin/yum
修改第一行为:#!/usr/bin/python2.6
 
二、pip的安装需要依赖setuptools,所有需要先安装setuptools
 
]# cd /opt/
 
]# wget https://pypi.python.org/packages/61/3c/8d680267eda244ad6391fb8b211bd39d8b527f3b66207976ef9f2f106230/setuptools-1.4.2.tar.gz
 
]# tar zxvf setuptools-1.4.2.tar.gz
 
]# cd setuptools-1.4.2
 
]# python setup.py install
 
三、安装pip
 

]# cd /opt/
 
]# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
 
]# tar zxvf pip-1.5.4.tar.gz
 
]# cd pip-1.5.4
 
]# python setup.py install
 
]# pip
-bash: pip: command not found
 
]# find / -name pip
/usr/local/python2.7/bin/pip
/usr/local/python2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip
 
]# ln -s /usr/local/python2.7/bin/pip /usr/bin/pip
 
 
 
 
 
 
 

posted on 2018-11-29 10:05  兔大锤  阅读(1102)  评论(0编辑  收藏  举报

导航