CentOS 6.7上安装Python 2.7.8
时间:2015-11-30 15:55 来源:51cto.com 作者:IT
Python的安装部署
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel -y
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar zxf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/usr/local/python
make && make install
cd ..
echo "PATH=/usr/local/python/bin:$PATH" >>/etc/profile
. /etc/profile
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
写一个简单的Python程序在屏幕上输出“Hello world”
[root@python python]# cat hello.py
#!/usr/bin/env python
print 'Hello world'
[root@python python]# ./hello.py
Hello world
(责任编辑:IT)
Python的安装部署
写一个简单的Python程序在屏幕上输出“Hello world”
|