Upgrading to Python 2.7

Hi,

I wanted to get python 2.7 installed on my FreeBSD box so I went ahead and installed the 27 port and it seems to have installed correctly. However, when ever I execute "python" it still brings me into the python 2.6.6 shell. How do I get this to bring me into the 27 shell and also make it the default to run my scripts in 2.7? Yeah, I could put the path in shbang but I'm lazy. Also, anyone know how I can get easy_install to recognize python 2.7?

I can get into the 2.7 shell by executing python2.7.

Thanks!
 
how did you install the various python versions? I guess you didn't use the ports framework (as that way it would not allow you to install both of them at the same time).
 
Ports framework does allow you to install both Python 2.6 and Python 2.7 at the same time.

Code:
[starlight] ~ > pkg_info -E python\*
python26-2.6.6
python27-2.7.1_1
And no, I didn't force anything.
 
I have both installed too
Code:
#1723:> pkg_info -E python\*
python26-2.6.6
python27-2.7.1_1
#1724:>
python27-2.7.1_1 comes up as my default, I want python26-2.6.6 instead
I was told by killasmurf86 and by roddierod to set the following line in /etc/make.conf
Code:
PYTHON_DEFAULT_VERSION=2.6
It has not worked for me, might work for you, don't know
Just got a reply from wblock that said
make.conf does not set the default version to run, just the version to use as a dependency.

/usr/local/bin/python is a hard link. It may be as simple as whichever python package was installed last overwrites it.

SO I AM CONFUSED without a solution, if it works for you, plz let me know
 
danger@ said:
how did you install the various python versions? I guess you didn't use the ports framework (as that way it would not allow you to install both of them at the same time).

Actually yes, I did use ports.



Why not just deinstall python2.6? Or deinstall all of them and just install the one you want.

Perhaps this is what I should do instead.
 
Back
Top