LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-02-2012, 01:18 AM   #1
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Rep: Reputation: 16
installing python 3 on ubuntu 10.4


so i wanted to run a script that requires python 3.

i am running ubuntu 10.4

so i install it via synaptic

but when i check the version --
Code:
casper@casper-SX280:~/public_html$ python -V
Python 2.6.6
casper@casper-SX280:~/public_html$
so i manually download Python-3.2.2.tar.bz2 and copy it to the desktop.

untar the file using:
tar -xvjpf Python-3.2.2.tar.bz2

type in :
./configue

then type:
make

then type:

sudo make install

i dont see any errors - but
again when i check the version --
Code:
casper@casper-SX280:~/public_html$ python -V
Python 2.6.6
casper@casper-SX280:~/public_html$

do i have to uninstall python 2 to install version 3?
 
Old 03-02-2012, 10:48 AM   #2
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 90

Rep: Reputation: 17
The command to run python 3 will be something along the lines of python3.2, not just python.
Run
Code:
ls /usr/bin/python3*
to see the version you have.
 
Old 03-02-2012, 04:29 PM   #3
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
Code:
casper@casper-SX280:~/public_html$ ls -tlr /usr/bin/python3*
-rwxr-xr-x 1 root root 2547004 2011-12-09 16:50 /usr/bin/python3.1
lrwxrwxrwx 1 root root       9 2012-03-02 00:39 /usr/bin/python3 -> python3.1
casper@casper-SX280:~/public_html$
OK so I guess when i run my scripts i will just use the invocation:
#!/usr/bin/python3

thanks - that makes sense
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python 2.6 dependencies error installing python-sqlite2-2.5.5-1.1.i586.rpm jmp007 Linux - Newbie 1 02-11-2011 11:05 AM
Installing Python 3k opus-outlaw Linux - Software 0 12-10-2008 01:51 PM
installing python library's (Python Numeric) Four Linux - Newbie 1 10-16-2005 02:31 PM
Installing Python 2.4?? PICOspark Programming 1 01-18-2005 10:14 AM
Installing Python 2.2.3-26 in RH 8 jdtiede Red Hat 0 11-05-2003 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration