Step 1.) Install dependencie:
Python-3.3.0./configure --prefix=/opt/python3.3make
sudo make install
sudo apt-get build-dep python3.2
sudo apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
Step 2.) Download Python 3.3.0:
wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgzStep 3.) Extract:
tar xvfz Python-3.3.0.tgzStep 4.) Configure and Install:
Python-3.3.0./configure --prefix=/opt/python3.3make
sudo make install
Create one demo program:
open your favorite text editor and give name with extension .py
write this code in that file. Here I have created test.py
name = raw_input('What is your city name?\n')
print 'Hi, %s.' % name
Run this file like this:
pyhton test.py
Output:
What is your city name? (It will wait for your answer)
Hi, Ahmedabad
0 comments:
Post a Comment