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”
[[email protected] python]# cat hello.py #!/usr/bin/env python print ‘Hello world‘ [[email protected] python]# ./hello.py Hello world
时间: 2024-12-22 07:17:35