Python et Tkinter sous Kubuntu
Résolu
Yoan
Messages postés
11795
Date d'inscription
Statut
Modérateur
Dernière intervention
-
Yoan Messages postés 11795 Date d'inscription Statut Modérateur Dernière intervention -
Yoan Messages postés 11795 Date d'inscription Statut Modérateur Dernière intervention -
Hello,
J'ai un petit souci pour appeler Tkinter avec Python :
J'ai tenté un apt-get install --reinstall python mais ça n'a pas bougé.
Quelqu'un a-t-il une idée ?
Merci.
J'ai un petit souci pour appeler Tkinter avec Python :
yoan@PRECISION:~/Desktop/python$ python Python 2.4.3 (#1, Aug 23 2006, 11:43:00) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from Tkinter import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ? import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter >>>
J'ai tenté un apt-get install --reinstall python mais ça n'a pas bougé.
Quelqu'un a-t-il une idée ?
Merci.
A voir également:
- Python et Tkinter sous Kubuntu
- Citizen code python avis - Accueil - Outils
- Mot secret python pix ✓ - Forum Python
- Python est introuvable. exúcutez sans argument pour procúder ó l ✓ - Forum Python
- Python par la pratique : 101 exercices corrigés pdf - Forum Python
- Exercice python - Forum Python
13 réponses
salut essaie d'installer tcl-Tk et ensuite de réinstaller python
python sur linux n'est pas necessairement installé avec Tk alors qu'avec tcl oui. le fait de reinstaller python apres devrait lui permettre de reconnaitre Tk
j'en suis pas vraiment sur... mais j'ai deja résolu ce probleme comme ça
python sur linux n'est pas necessairement installé avec Tk alors qu'avec tcl oui. le fait de reinstaller python apres devrait lui permettre de reconnaitre Tk
j'en suis pas vraiment sur... mais j'ai deja résolu ce probleme comme ça
Je sais que j'avais déjà installé Tcl/Tk par adept, donc apparemment ça ne change rien.
apt-get install --reinstall python-tk suivi d'une réinstallation de python ne donne rien non plus :-/
apt-get install --reinstall python-tk suivi d'une réinstallation de python ne donne rien non plus :-/
as-tu essayé avec idle-python ?
oui :)
il y a python 2.4 et python 2.5
Le problème c'est que si je veux virer python 2.4 il veut m'enlever tout ça aussi :
il y a python 2.4 et python 2.5
Le problème c'est que si je veux virer python 2.4 il veut m'enlever tout ça aussi :
Les paquets suivants seront ENLEVÉS : adept adept-batch adept-common adept-installer adept-manager adept-notifier adept-updater akregator alsa-utils amarok amarok-xine amor ark artsbuilder atlantik atlantikdesigner bicyclerepair blinken cervisia dcoprss digikam eyesapplet fifteenapplet filelight gimp-python gtk2-engines-gtk-qt gwenview hplip hwdb-client-common hwdb-client-kde juk k3b kaboodle kaddressbook kaddressbook-plugins kaffeine kaffeine-xine kalarm kalzium kamera kanagram kandy kappfinder karm kasteroids katapult kate kate-plugins katomic kaudiocreator kbackgammon kbattleship kblackbox kbounce kbruch kbstate kcalc kcharselect kcoloredit kcontrol kcron kdat kde-amusements kde-core kde-guidance kde-guidance-powermanager kde-style-lipstik kde-systemsettings kdeaccessibility kdeaddons kdeaddons-kfile-plugins kdeadmin kdeadmin-kfile-plugins kdeartwork kdeartwork-style kdeartwork-theme-window kdebase kdebase-bin kdebase-kio-plugins kdebluetooth kdeedu kdegames kdegraphics kdegraphics-kfile-plugins kdelibs kdelibs4c2a kdelirc kdemultimedia-kappfinder-data kdemultimedia-kfile-plugins kdemultimedia-kio-plugins kdenetwork kdenetwork-filesharing kdenetwork-kfile-plugins kdepasswd kdepim kdepim-kfile-plugins kdepim-kio-plugins kdepim-kresources kdepim-wizards kdeprint kdesdk-scripts kdesktop kdessh kdetoys kdeutils kdewebdev kdf kdict kdm kdnssd kdvi kedit keduca keep kenolaba kfax kfaxview kfilereplace kfind kfloppy kfouleggs kftpgrabber kgamma kget kghostview kgoldrunner kgpg khangman khelpcenter khexedit kicker kicker-applets kiconedit kig kimagemapeditor kio-apt kio-locate kipi-plugins kitchensync kiten kjots kjumpingcube klaptopdaemon klatin kleopatra klettres klickety klines klinkstatus klipper kmag kmahjongg kmail kmailcvt kmenuedit kmid kmilo kmines kmix kmoon kmousetool kmouth kmplayer-base kmplayer-konq-plugins kmplot kmrml knetwalk knetworkconf knewsticker knewsticker-scripts knode knotes kodo koffice-libs kolf kolourpaint kommander kompare konq-plugins konqueror konqueror-nsplugins konquest konsole konsolekalendar kontact konversation kooka kopete korganizer korn kpackage kpager kpat kpdf kpercentage kpersonalizer kpf kpilot kpoker kpovmodeler kppp krdc krec kregexpeditor kreversi krfb krita kruler ksame ksayit kscd kscreensaver kscreensaver-xsavers kshisen ksig ksim ksirc ksirtet ksmiletris ksmserver ksnake ksnapshot ksokoban kspaceduel ksplash ksplash-engine-moodin kstars ksvg ksync ksysguard ksystemlog ksysv ktalkd kteatime ktimer ktip ktnef ktorrent ktouch ktron kttsd ktuberling kturtle ktux kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-konqueror-shortcuts kuser kverbos kview kviewshell kvoctrain kwalletmanager kweather kwifimanager kwin kwin-style-crystal kwin4 kwordquiz kworldclock kxsldbg language-selector-common language-selector-qt language-support-en launchpad-integration libarts1-mpeglib libarts1-xine libboost-python1.33.1 libcvsservice0 libk3b2 libk3b2-mp3 libkcal2b libkcddb1 libkdeedu3 libkdegames1 libkdepim1a libkexif1 libkgantt0 libkipi0 libkiten1 libkleopatra1 libkmime2 libkonq4 libkpimexchange1 libkpimidentities1 libkscan1 libksieve0 libktnef1 libpythonize0 librss1 libskim0 lilo-config lisa lsb-release lskat mpeglib networkstatus noatun noatun-plugins openoffice.org openoffice.org-help-en-us openoffice.org-kde openoffice.org-writer pykdeextensions python python-adns python-apt python-cairo python-cddb python-central python-clientcookie python-crypto python-dbus python-egenix-mxproxy python-egenix-mxstack python-egenix-mxtexttools python-egenix-mxtools python-elementtree python-epydoc python-eunuchs python-examples python-gadfly python-gd python-gdbm python-genetic python-geoip python-glade2 python-gnupginterface python-gobject python-gtk2 python-htmlgen python-htmltmpl python-id3lib python-imaging python-imaging-sane python-jabber python-kde3 python-kjbuckets python-ldap python-libxml2 python-mysqldb python-netcdf python-newt python-numeric python-numeric-ext python-numeric-tutorial python-pam python-parted python-pexpect python-pgsql python-pisock python-pqueue python-pyao python-pylibacl python-pyogg python-pyopenssl python-pyvorbis python-pyxattr python-qt3 python-qt4 python-reportlab python-scientific python-simpletal python-sip4 python-soappy python-sqlite python-stats python-support python-syck python-tk python-unit python-uno python-xdg python-xlib python-xml python-xmpp python2.4 python2.4-adns python2.4-clientcookie python2.4-crypto python2.4-dev python2.4-dictclient python2.4-egenix-mxdatetime python2.4-egenix-mxproxy python2.4-egenix-mxstack python2.4-egenix-mxtexttools python2.4-egenix-mxtools python2.4-epydoc python2.4-eunuchs python2.4-examples python2.4-gadfly python2.4-gd python2.4-geoip python2.4-htmlgen python2.4-htmltmpl python2.4-id3lib python2.4-imaging python2.4-imaging-sane python2.4-jabber python2.4-kjbuckets python2.4-ldap python2.4-librdf python2.4-mysqldb python2.4-pam python2.4-pexpect python2.4-pgsql python2.4-pycurl python2.4-pylibacl python2.4-pyopenssl python2.4-pyorbit python2.4-pyxattr python2.4-reportlab python2.4-simpletal python2.4-soappy python2.4-sqlite python2.4-syck python2.4-unit python2.4-xlib python2.4-xml python2.4-xmpp quanta rdiff-backup reportbug secpolicy skim soundkonverter superkaramba thunderbird-locale-en-gb ubuntu-base ubuntu-minimal wlassistant ytalk
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Salut,
Chez moi ça marche avec 2.4
Je ne sais pas si ça peut avoir une influence. Es-tu sous Sarge?
Tu peux passer à Etch (pas besoin de tout réinstaller) - à toi de voir
Ton Sarge deviendra Etch :-))
Chez moi ça marche avec 2.4
lami20j@debian:~$ ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 2003-08-11 09:52 /usr/bin/python -> python2.4 lami20j@debian:~$ python Python 2.4.4 (#2, Jan 13 2007, 17:50:26) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
Je ne sais pas si ça peut avoir une influence. Es-tu sous Sarge?
Tu peux passer à Etch (pas besoin de tout réinstaller) - à toi de voir
sed -i.orig 's/^/#/' /etc/apt/sources.listMets ça dans /etc/apt/sources.list
deb ftp://ftp.fr.debian.org/debian/ etch main non-free contrib deb-src ftp://ftp.fr.debian.org/debian/ etch main non-free contrib deb https://www.debian.org/security/ etch/updates main contrib non-free deb-src https://www.debian.org/security/ etch/updates main contrib non-freeEnsuite tape
apt-get update apt-get -u dist-upgrade
Ton Sarge deviendra Etch :-))
Je sais pas bien ce que je fais mais je le fais :)
ls -l $(which python) -rwxr-xr-x 2 root root 2966741 2006-08-23 11:44 /usr/local/bin/python
C'est pour ça que ton lien ne fonctionne pas correctement.
Comment ça se fait que tu as un python en /usr/local/bin
Tape et affiche (les 4 commandes, une après l'autre)
Comment ça se fait que tu as un python en /usr/local/bin
Tape et affiche (les 4 commandes, une après l'autre)
python -V mv /usr/local/bin/python /usr/local/bin/python.save ls -l $(which python) python -V
La série de commande est trop longue pour que je la copie. Maintenant j'ai ça :
et Tk fonctionne :)
Merci !
yoan@PRECISION:~$ python -V Python 2.5 yoan@PRECISION:~$ ls -l $(which python) lrwxrwxrwx 1 root root 18 2007-02-18 15:54 /usr/bin/python -> /usr/bin/python2.5 yoan@PRECISION:~$ python Python 2.5 (r25:51908, Oct 6 2006, 15:22:41) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
et Tk fonctionne :)
Merci !
La série de commande est trop longue pour que je la copie
Ben, vu à quel point t'es paresseux tu peux faire de Perl :-))
Les trois grandes vertus du programmeur sont la paresse, l'impatience et l'orgueil. Reportez-vous au livre ``Programmation en Perl'' (le Camel Book) pour savoir pourquoi.
Ok, mais tu as fait quoi pour obtenir
yoan@PRECISION:~$ ls -l $(which python)
lrwxrwxrwx 1 root root 18 2007-02-18 15:54 /usr/bin/python -> /usr/bin/python2.5 ?
Ben, vu à quel point t'es paresseux tu peux faire de Perl :-))
Les trois grandes vertus du programmeur sont la paresse, l'impatience et l'orgueil. Reportez-vous au livre ``Programmation en Perl'' (le Camel Book) pour savoir pourquoi.
Ok, mais tu as fait quoi pour obtenir
yoan@PRECISION:~$ ls -l $(which python)
lrwxrwxrwx 1 root root 18 2007-02-18 15:54 /usr/bin/python -> /usr/bin/python2.5 ?
ben tout ça :
et dès que j'ai refait :
python -V mv /usr/local/bin/python /usr/local/bin/python.save ls -l $(which python) python -Vet pour la 3e commande il m'a coupé le début parce que c'était trop long, puis même si je copiait ce que j'avais ça risquait d'être lourd sur la page :)
et dès que j'ai refait :
ls -l $(which python) python -Vc'était bon.