If you have Linux server with Python 2.4 by default and You want to upgrade it? Here you go.
This an easy way to upgrade from default Python 2.4 to Python 2.7.3. I'm not expert on Linux but this way is works for me and it will not collide with your default Python. To run your bot, you're using python2.7 instead of python.
Now here we go.
Login to server using ssh client like Putty or whatever is. Check python version, if you see 2.4.x then go step above to upgrade.
- screen [enter]
- alias python2.7=/tmp/python2.7/bin/python2.7 [enter]
- python2.7 bot/bot.py [enter]
- close your ssh client
- violaaaaa.....
PS: if get the following error with "yum" like this -bash: yum: command not found, try this;
sudo apt-get update
sudo apt-get install yum rpm
This an easy way to upgrade from default Python 2.4 to Python 2.7.3. I'm not expert on Linux but this way is works for me and it will not collide with your default Python. To run your bot, you're using python2.7 instead of python.
Login to server using ssh client like Putty or whatever is. Check python version, if you see 2.4.x then go step above to upgrade.
- mkdir tmp (you can change "tmp" to whatever you what. its just a folder name)
- cd tmp
- wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar jxf Python-2.7.3.tar.bz2
- ./configure If you get the following error:
- make
- make altinstall prefix=/tmp/python2.7.3
- cd /tmp
- ln -s /tmp/python2.7.3 /tmp/python2.7
configure: error: no acceptable C compiler found in $PATH
do this step:
- yum install gcc tcl tk sqlite-devel readline-devel gdbm-devel
- yum install tkinter ncurses-devel libdbi-devel tk-devel zlib-devel
- yum install openssl-devel bzip2-devel
go to
/tmp/Python-2.7.3 directory (cd /tmp/
Python-2.7.3) then repeat step
5 again. Wait until finish then go to next step- screen [enter]
- alias python2.7=/tmp/python2.7/bin/python2.7 [enter]
- python2.7 bot/bot.py [enter]
- close your ssh client
- violaaaaa.....
PS: if get the following error with "yum" like this -bash: yum: command not found, try this;
sudo apt-get update
sudo apt-get install yum rpm