PDA

View Full Version : python 3 in fedora 12?



Aisthesis
28th May 2010, 02:23 AM
how can i install python 3 and idle in fedora 12?

yum search for any plausible variation on python3 (python-3, Python-3.1, etc.) that i could think of yields nothing, same in add/remove software.

so i got the tarball from python.org and followed book instructions on it (summerfield's python 3, p. 4), namely unpack it, run './configure', run 'make' and finally run 'make install'

in my add/remove programs window, for idle, it says i have the one for python 2.6 installed, but i can't find where to open the program. but i'd like to use 3.1.2 python anyway.

additional note: if i type python -V i get Python 2.6.x (can't remember the last digit, i think it's 2), and if i type python3 -V i get Python 3.1.2.

so, how do i get python 3 installed and idle for python 3 running?

jpollard
28th May 2010, 02:36 AM
It is likely that Python got installed...

in /usr/local/bin.

You may have /usr/bin in front of /usr/local/bin in your PATH environment variable...

Aisthesis
28th May 2010, 04:19 AM
python 2.6 got installed with the fedora install. i want to install 3.1.2 and to be able to use IDLE

---------- Post added at 10:19 PM CDT ---------- Previous post was at 10:08 PM CDT ----------

on second look, u r right:

i have python 3 in /usr/local/bin and python 2 in usr/bin

as long as it won't mess up applications running python scripts in version 2, i'd really like to be able to execute my own python scripts from command line and use idle. what do i do to be able to do that?

jpollard
28th May 2010, 12:13 PM
Either specify the full path to the python interpreter (/usr/local/bin/python...)
OR
Rearrange the PATH environment variable to put /usr/local/bin at the front of the
list

OR
remove the python 2 package.

leigh123linux
28th May 2010, 12:41 PM
Either specify the full path to the python interpreter (/usr/local/bin/python...)
OR
Rearrange the PATH environment variable to put /usr/local/bin at the front of the
list

OR
remove the python 2 package.


I wouldn't recommend this as it will break his system.


yum erase python

Remove 414 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)

Is this ok [y/N]:

jpollard
28th May 2010, 12:55 PM
You are right - I forgot how embedded Python has become...

Though that brings up another question - Is the Python 3 set compatible
with Python2?

sonoran
28th May 2010, 01:12 PM
Though that brings up another question - Is the Python 3 set compatible
with Python2?
No. Most Python apps need to be rewritten to run under 3, which will take some time (and no doubt some pain).

leigh123linux
28th May 2010, 01:28 PM
In F13 you can have both



[root@localhost leigh]# yum list |grep python3
python3.i686 3.1.2-4.fc13 updates
python3.x86_64 3.1.2-4.fc13 updates
python3-chardet.noarch 2.0.1-2.fc13 fedora
python3-coverage.x86_64 3.2-3.fc13 fedora
python3-deltarpm.x86_64 3.5-0.7.20100121git.fc13 fedora
python3-devel.i686 3.1.2-4.fc13 updates
python3-devel.x86_64 3.1.2-4.fc13 updates
python3-libs.i686 3.1.2-4.fc13 updates
python3-libs.x86_64 3.1.2-4.fc13 updates
python3-lxml.x86_64 2.2.6-1.fc13 fedora
python3-minimock.noarch 1.2.5-3.fc13 fedora
python3-mpi4py-mpich2.x86_64 1.2.1-2.fc13 fedora
python3-mpi4py-openmpi.x86_64 1.2.1-2.fc13 fedora
python3-ply.noarch 3.3-2.fc13 fedora
python3-psutil.noarch 0.1.3-2.fc13 fedora
python3-pyke.noarch 1.1.1-1.fc13 fedora
python3-setuptools.noarch 0.6.10-3.fc13 fedora
python3-smbpasswd.x86_64 1.0.1-13.fc13 fedora
python3-test.x86_64 3.1.2-4.fc13 updates
python3-tkinter.x86_64 3.1.2-4.fc13 updates
python3-tools.x86_64 3.1.2-4.fc13 updates
[root@localhost leigh]#

Aisthesis
28th May 2010, 03:08 PM
do both come pre-installed in fedora 13?

also, i do have it to the point of being able to run python3 code now ('% python3 whatever.py' runs python 3 code), but i can't figure out how to call up idle in either version--although idle for version 2.6 is supposed to be installed.

leigh123linux
28th May 2010, 04:29 PM
do both come pre-installed in fedora 13?

also, i do have it to the point of being able to run python3 code now ('% python3 whatever.py' runs python 3 code), but i can't figure out how to call up idle in either version--although idle for version 2.6 is supposed to be installed.



No they don't.

http://docs.fedoraproject.org/en-US/Fedora/13/html-single/Release_Notes/#sect-Release_Notes-Tools
http://fedoraproject.org/wiki/Features/Python3F13