LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-14-2011, 12:53 PM   #1
splintercdo
Member
 
Registered: Feb 2011
Location: Riga, Latvia
Distribution: AVLinux 6.0
Posts: 124

Rep: Reputation: 9
where is default python set?


Hey guys,

I guess this will be easy one.

I had 2.6.4 python from standard Slackware installation, I compiled source and installed python 2.5.5, made this with make install, not make altinstall, so 2.5.5 now is my default python and actually it's not a problem, but I started to wonder where is set some value that determines, that writing python in bash I start version 2.5.5 not 2.6.4?

I tried set and looked in /etc/profile, but there are no signs of things I find :S
 
Old 02-14-2011, 01:11 PM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Typing "python" into bash will run the first thing it finds in the path which is /usr/bin/python which is a link set to /usr/bin/python2.6 in standard Slackware. I'd be very careful when changing python versions from the distribution's default as you can run into all sorts of problems. Best to keep the original and install any different versions as additional and keep the python link pointing to the original too.
 
Old 02-14-2011, 01:17 PM   #3
splintercdo
Member
 
Registered: Feb 2011
Location: Riga, Latvia
Distribution: AVLinux 6.0
Posts: 124

Original Poster
Rep: Reputation: 9
thanks, I forgot to tell I started to mess with symlinks, but for some reason
executing
rm /usr/bin/python
and then
ln -s /usr/bin/python2.6 /usr/bin/python
doesn't affect anything, almost... if I call /usr/bin/python then 2.6.4 is called, but if I write just python, then 2.5.5 is called hmm...
 
Old 02-14-2011, 01:19 PM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Try running this
Code:
file $(which python)
to see what's what and this
Code:
alias
to check you haven't set up an alias for python.

Last edited by bgeddy; 02-14-2011 at 01:31 PM. Reason: More information
 
Old 02-14-2011, 01:27 PM   #5
splintercdo
Member
 
Registered: Feb 2011
Location: Riga, Latvia
Distribution: AVLinux 6.0
Posts: 124

Original Poster
Rep: Reputation: 9
yes, thats good advice but a bit too late,
I found what was the problem, I looked again in /etc/profile and noticed that in my path variable /usr/local/bin was before /usr/bin

removed symlink from it: rm /usr/local/bin/python
and added 2.6.4 to it ln -s /usr/bin/python2.6 /usr/local/bin/python

everything is back to standard

thanks for help

Last edited by splintercdo; 02-14-2011 at 01:29 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ices0 and python: trying to set up server/client structure hoes Linux - Software 0 10-08-2009 01:54 PM
[SOLVED] Need Python or Perl script to create a default web page on hosting site chilali Linux - Server 2 08-03-2009 05:41 AM
Change default Python version rocka Debian 13 03-31-2009 05:26 PM
grub-set-default ... get-default? RaduH Linux - General 1 11-21-2007 01:05 PM
LXer: change of the default python version (status) LXer Syndicated Linux News 0 08-08-2006 02:33 PM


All times are GMT -5. The time now is 05:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration