Pages : 1
#1 Le 16/03/2019, à 18:26
- piter42
"RESOLU"mise à jour python 3.7.2
bonsoir
je me suis aperçu que je n'avais plus python 3.7.2 sur mon pc mais 3.5 alors que j avais tout installé,quand je tape python3.6 en ligne de commande il m indique bien que j ai la version 3.6.7 d installée.Quand je tape"sudo apt-get install python3.7.2" tout est bien installé..je m en suis aperçu car avec geany quand je change le .format() par f-string il ne veut pas l éxécuter car il travail avec 3.5 par défaut ?
merci pour vos réponses
Dernière modification par piter42 (Le 19/03/2019, à 17:43)
Hors ligne
#2 Le 16/03/2019, à 19:06
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Bonsoir,
Que donne cette commande ?
dpkg -l | grep python
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#3 Le 16/03/2019, à 20:03
- pingouinux
Re : "RESOLU"mise à jour python 3.7.2
Bonsoir,
Tu peux aussi donner le retour de
ls -ld /usr/bin/python*
Hors ligne
#4 Le 17/03/2019, à 10:50
- piter42
Re : "RESOLU"mise à jour python 3.7.2
Bonsoir,
Tu peux aussi donner le retour dels -ld /usr/bin/python*
pierre@pierre-Inspiron-15-3567:~$ ls -ld /usr/bin/python*
lrwxrwxrwx 1 root root 9 nov. 24 2017 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 nov. 24 2017 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3492656 nov. 12 20:46 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 nov. 12 20:46 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 16 nov. 24 2017 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 9 janv. 2 17:08 /usr/bin/python3 -> python3.5
-rwxr-xr-x 2 root root 4464368 nov. 12 17:27 /usr/bin/python3.5
lrwxrwxrwx 1 root root 33 nov. 12 17:27 /usr/bin/python3.5-config -> x86_64-linux-gnu-python3.5-config
-rwxr-xr-x 2 root root 4464368 nov. 12 17:27 /usr/bin/python3.5m
lrwxrwxrwx 1 root root 34 nov. 12 17:27 /usr/bin/python3.5m-config -> x86_64-linux-gnu-python3.5m-config
-rwxr-xr-x 2 root root 4604416 oct. 26 01:03 /usr/bin/python3.6
-rwxr-xr-x 2 root root 4604416 oct. 26 01:03 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 16 mars 23 2016 /usr/bin/python3-config -> python3.5-config
lrwxrwxrwx 1 root root 10 janv. 2 17:08 /usr/bin/python3m -> python3.5m
lrwxrwxrwx 1 root root 17 mars 23 2016 /usr/bin/python3m-config -> python3.5m-config
lrwxrwxrwx 1 root root 16 nov. 24 2017 /usr/bin/python-config -> python2.7-config
pierre@pierre-Inspiron-15-3567:~$ dpkg -l | grep python
ii dh-python 2.20151103ubuntu1.1 all Debian helper tools for packaging Python libraries and applications
rc idle-python2.7 2.7.12-1ubuntu0~16.04.4 all IDE for Python (v2.7) using Tkinter
ii idle-python3.5 3.5.2-2ubuntu0~16.04.5 all IDE for Python (v3.5) using Tkinter
ii idle-python3.6 3.6.7-1~16.04.york3 all IDE for Python (v3.6) using Tkinter
ii libpeas-1.0-0-python3loader 1.16.0-1ubuntu2 amd64 Application plugin library
ii libpython-all-dev:amd64 2.7.12-1~16.04 amd64 package depending on all supported Python development packages
ii libpython-dev:amd64 2.7.12-1~16.04 amd64 header files and a static library for Python (default)
ii libpython-stdlib:amd64 2.7.12-1~16.04 amd64 interactive high-level object-oriented language (default python version)
ii libpython2.7:amd64 2.7.12-1ubuntu0~16.04.4 amd64 Shared Python runtime library (version 2.7)
ii libpython2.7-dev:amd64 2.7.12-1ubuntu0~16.04.4 amd64 Header files and a static library for Python (v2.7)
ii libpython2.7-minimal:amd64 2.7.12-1ubuntu0~16.04.4 amd64 Minimal subset of the Python language (version 2.7)
ii libpython2.7-stdlib:amd64 2.7.12-1ubuntu0~16.04.4 amd64 Interactive high-level object-oriented language (standard library, version 2.7)
ii libpython3-dev:amd64 3.5.1-3 amd64 header files and a static library for Python (default)
ii libpython3-stdlib:amd64 3.5.1-3 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.5:amd64 3.5.2-2ubuntu0~16.04.5 amd64 Shared Python runtime library (version 3.5)
ii libpython3.5-dev:amd64 3.5.2-2ubuntu0~16.04.5 amd64 Header files and a static library for Python (v3.5)
ii libpython3.5-minimal:amd64 3.5.2-2ubuntu0~16.04.5 amd64 Minimal subset of the Python language (version 3.5)
ii libpython3.5-stdlib:amd64 3.5.2-2ubuntu0~16.04.5 amd64 Interactive high-level object-oriented language (standard library, version 3.5)
ii libpython3.6-minimal:amd64 3.6.7-1~16.04.york3 amd64 Minimal subset of the Python language (version 3.6)
ii libpython3.6-stdlib:amd64 3.6.7-1~16.04.york3 amd64 Interactive high-level object-oriented language (standard library, version 3.6)
ii python 2.7.12-1~16.04 amd64 interactive high-level object-oriented language (default version)
ii python-all 2.7.12-1~16.04 amd64 package depending on all supported Python runtime versions
ii python-all-dev 2.7.12-1~16.04 amd64 package depending on all supported Python development packages
ii python-apt-common 1.1.0~beta1ubuntu0.16.04.2 all Python interface to libapt-pkg (locales)
ii python-bs4 4.4.1-1 all error-tolerant HTML parser for Python
ii python-cairo 1.8.8-2 amd64 Python bindings for the Cairo vector graphics library
ii python-chardet 2.3.0-2 all universal character encoding detector for Python2
ii python-collada 0.4-2 all Python module for creating, editing and loading COLLADA
ii python-cycler 0.9.0-1 all composable kwarg iterator (Python 2)
ii python-dateutil 2.4.2-1 all powerful extensions to the standard datetime module
ii python-dev 2.7.12-1~16.04 amd64 header files and a static library for Python (default)
ii python-glade2 2.24.0-4ubuntu1 amd64 GTK+ bindings: Glade support
ii python-gobject-2 2.28.6-12ubuntu1 amd64 deprecated static Python bindings for the GObject library
ii python-gpgme 0.3-1.1 amd64 python wrapper for the GPGME library
ii python-gtk2 2.24.0-4ubuntu1 amd64 Python bindings for the GTK+ widget set
ii python-html5lib 0.999-4 all HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 2)
ii python-imaging 3.1.2-0ubuntu1.1 all Python Imaging Library compatibility layer
ii python-lxml 3.5.0-1ubuntu0.1 amd64 pythonic binding for the libxml2 and libxslt libraries
ii python-matplotlib 1.5.1-1ubuntu1 amd64 Python based plotting system in a style similar to Matlab
ii python-matplotlib-data 1.5.1-1ubuntu1 all Python based plotting system (data package)
ii python-minimal 2.7.12-1~16.04 amd64 minimal subset of the Python language (default version)
ii python-numpy 1:1.11.0-1ubuntu1 amd64 Numerical Python adds a fast array facility to the Python language
ii python-pil:amd64 3.1.2-0ubuntu1.1 amd64 Python Imaging Library (Pillow fork)
ii python-pip 8.1.1-2ubuntu0.4 all alternative Python package installer
ii python-pip-whl 8.1.1-2ubuntu0.4 all alternative Python package installer
ii python-pivy 0.5.0~v609hg-3.1 amd64 Coin binding for Python
ii python-pkg-resources 20.7.0-1 all Package Discovery and Resource Access using pkg_resources
ii python-ply 3.7-1 all Lex and Yacc implementation for Python2
ii python-pyparsing 2.0.3+dfsg1-1ubuntu0.1 all Python parsing module
ii python-pyside 1.2.2-2build2 all Python bindings for Qt4 (big metapackage)
ii python-pyside.phonon 1.2.2-2build2 amd64 Qt 4 Phonon module - Python bindings
ii python-pyside.qtcore 1.2.2-2build2 amd64 Qt 4 core module - Python bindings
ii python-pyside.qtdeclarative 1.2.2-2build2 amd64 Qt 4 Declarative module - Python bindings
ii python-pyside.qtgui 1.2.2-2build2 amd64 Qt 4 GUI module - Python bindings
ii python-pyside.qthelp 1.2.2-2build2 amd64 Qt 4 help module - Python bindings
ii python-pyside.qtnetwork 1.2.2-2build2 amd64 Qt 4 network module - Python bindings
ii python-pyside.qtopengl 1.2.2-2build2 amd64 Qt 4 OpenGL module - Python bindings
ii python-pyside.qtscript 1.2.2-2build2 amd64 Qt 4 script module - Python bindings
ii python-pyside.qtsql 1.2.2-2build2 amd64 Qt 4 SQL module - Python bindings
ii python-pyside.qtsvg 1.2.2-2build2 amd64 Qt 4 SVG module - Python bindings
ii python-pyside.qttest 1.2.2-2build2 amd64 Qt 4 test module - Python bindings
ii python-pyside.qtuitools 1.2.2-2build2 amd64 Qt 4 UI tools module - Python bindings
ii python-pyside.qtwebkit 1.2.2-2build2 amd64 Qt 4 WebKit module - Python bindings
ii python-pyside.qtxml 1.2.2-2build2 amd64 Qt 4 XML module - Python bindings
ii python-qt4 4.11.4+dfsg-1build4 amd64 Python bindings for Qt4
ii python-qt4-gl 4.11.4+dfsg-1build4 amd64 Python bindings for Qt4's OpenGL module
ii python-setuptools 20.7.0-1 all Python Distutils Enhancements
ii python-sip 4.17+dfsg-1build1 amd64 Python/C++ bindings generator runtime library
ii python-six 1.10.0-3 all Python 2 and 3 compatibility library (Python 2 interface)
ii python-talloc 2.1.5-2 amd64 hierarchical pool based memory allocator - Python bindings
ii python-tk 2.7.12-1~16.04 amd64 Tkinter - Writing Tk applications with Python
ii python-tz 2014.10~dfsg1-0ubuntu2 all Python version of the Olson timezone database
ii python-wheel 0.29.0-1 all built-package format for Python
ii python2.7 2.7.12-1ubuntu0~16.04.4 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-dev 2.7.12-1ubuntu0~16.04.4 amd64 Header files and a static library for Python (v2.7)
ii python2.7-minimal 2.7.12-1ubuntu0~16.04.4 amd64 Minimal subset of the Python language (version 2.7)
ii python3 3.5.1-3 amd64 interactive high-level object-oriented language (default python3 version)
ii python3-apport 2.20.1-0ubuntu2.18 all Python 3 library for Apport crash report handling
ii python3-apt 1.1.0~beta1ubuntu0.16.04.2 amd64 Python 3 interface to libapt-pkg
ii python3-aptdaemon 1.1.1+bzr982-0ubuntu14 all Python 3 module for the server and client of aptdaemon
ii python3-aptdaemon.gtk3widgets 1.1.1+bzr982-0ubuntu14 all Python 3 GTK+ 3 widgets to run an aptdaemon client
ii python3-aptdaemon.pkcompat 1.1.1+bzr982-0ubuntu14 all PackageKit compatibilty for AptDaemon
ii python3-blinker 1.3.dfsg2-1build1 all fast, simple object-to-object and broadcast signaling library
ii python3-brlapi 5.3.1-2ubuntu2.1 amd64 Braille display access via BRLTTY - Python3 bindings
ii python3-bs4 4.4.1-1 all error-tolerant HTML parser for Python 3
ii python3-cairo 1.10.0+dfsg-5build1 amd64 Python 3 bindings for the Cairo vector graphics library
ii python3-cffi-backend 1.5.2-1ubuntu1 amd64 Foreign Function Interface for Python 3 calling C code - runtime
ii python3-chardet 2.3.0-2 all universal character encoding detector for Python3
ii python3-checkbox-support 0.22-1 all collection of Python modules used by PlainBox providers
ii python3-commandnotfound 0.3ubuntu16.04.2 all Python 3 bindings for command-not-found.
ii python3-cryptography 1.2.3-1ubuntu0.2 amd64 Python library exposing cryptographic recipes and primitives (Python 3)
ii python3-cups 1.9.73-0ubuntu2 amd64 Python3 bindings for CUPS
ii python3-cupshelpers 1.5.7+20160212-0ubuntu2 all Python modules for printer configuration with CUPS
ii python3-dbus 1.2.0-3 amd64 simple interprocess messaging system (Python 3 interface)
ii python3-dbus.mainloop.qt 4.11.4+dfsg-1build4 amd64 D-Bus Support for PyQt4 with Python 3
ii python3-debian 0.1.27ubuntu2 all Python 3 modules to work with Debian-related data formats
ii python3-defer 1.0.6-2build1 all Small framework for asynchronous programming (Python 3)
ii python3-dev 3.5.1-3 amd64 header files and a static library for Python (default)
ii python3-distupgrade 1:16.04.26 all manage release upgrades
ii python3-feedparser 5.1.3-3build1 all Universal Feed Parser for Python 3
ii python3-gdbm:amd64 3.6.5-3~16.04.york4 amd64 GNU dbm database support for Python 3.x
ii python3-gi 3.20.0-0ubuntu1 amd64 Python 3 bindings for gobject-introspection libraries
ii python3-gi-cairo 3.20.0-0ubuntu1 amd64 Python 3 Cairo bindings for the GObject library
ii python3-guacamole 0.9.2-1 all framework for creating command line applications (Python 3)
ii python3-html5lib 0.999-4 all HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 3)
ii python3-httplib2 0.9.1+dfsg-1 all comprehensive HTTP client library written for Python3
ii python3-idna 2.0-3 all Python IDNA2008 (RFC 5891) handling (Python 3)
ii python3-jinja2 2.8-1 all small but fast and easy to use stand-alone template engine
ii python3-jwt 1.3.0-1ubuntu0.1 all Python 3 implementation of JSON Web Token
ii python3-louis 2.6.4-2ubuntu0.4 all Python bindings for liblouis
ii python3-lxml 3.5.0-1ubuntu0.1 amd64 pythonic binding for the libxml2 and libxslt libraries
ii python3-mako 1.0.3+ds1-1ubuntu1 all fast and lightweight templating for the Python 3 platform
ii python3-markupsafe 0.23-2build2 amd64 HTML/XHTML/XML string library for Python 3
ii python3-minimal 3.5.1-3 amd64 minimal subset of the Python language (default python3 version)
ii python3-oauthlib 1.0.3-1 all generic, spec-compliant implementation of OAuth for Python3
ii python3-padme 1.1.1-2 all mostly transparent proxy class for Python 3
ii python3-pexpect 4.0.1-1 all Python 3 module for automating interactive applications
ii python3-pil:amd64 3.1.2-0ubuntu1.1 amd64 Python Imaging Library (Python3)
ii python3-pip 8.1.1-2ubuntu0.4 all alternative Python package installer - Python 3 version of the package
ii python3-pkg-resources 20.7.0-1 all Package Discovery and Resource Access using pkg_resources
ii python3-plainbox 0.25-1 all toolkit for software and hardware testing (python3 module)
ii python3-problem-report 2.20.1-0ubuntu2.18 all Python 3 library to handle problem reports
ii python3-progressbar 2.3-2 all text progress bar library for Python (Python 3)
ii python3-ptyprocess 0.5-1 all Run a subprocess in a pseudo terminal from Python 3
ii python3-pyasn1 0.1.9-1 all ASN.1 library for Python (Python 3 module)
ii python3-pyatspi 2.18.0+dfsg-3 all Assistive Technology Service Provider Interface - Python3 bindings
ii python3-pycurl 7.43.0-1ubuntu1 amd64 Python bindings to libcurl (Python 3)
ii python3-pyparsing 2.0.3+dfsg1-1ubuntu0.1 all Python parsing module, Python3 package
ii python3-renderpm:amd64 3.3.0-1 amd64 python low level render interface
ii python3-reportlab 3.3.0-1 all ReportLab library to create PDF documents using Python3
ii python3-reportlab-accel:amd64 3.3.0-1 amd64 C coded extension accelerator for the ReportLab Toolkit
ii python3-requests 2.9.1-3ubuntu0.1 all elegant and simple HTTP library for Python3, built for human beings
ii python3-setuptools 20.7.0-1 all Python3 Distutils Enhancements
ii python3-six 1.10.0-3 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-software-properties 0.96.20.8 all manage the repositories that you install software from
ii python3-speechd 0.8.3-1ubuntu3 all Python interface to Speech Dispatcher
ii python3-systemd 231-2build1 amd64 Python 3 bindings for systemd
ii python3-tk:amd64 3.6.5-3~16.04.york4 amd64 Tkinter - Writing Tk applications with Python 3.x
ii python3-uno 1:5.1.6~rc2-0ubuntu1~xenial6 amd64 Python-UNO bridge
ii python3-update-manager 1:16.04.15 all python 3.x module for update-manager
ii python3-urllib3 1.13.1-2ubuntu0.16.04.2 all HTTP library with thread-safe connection pooling for Python3
ii python3-wheel 0.29.0-1 all built-package format for Python
ii python3-xdg 0.25-4 all Python 3 library to access freedesktop.org standards
ii python3-xkit 0.5.0ubuntu2 all library for the manipulation of xorg.conf files (Python 3)
ii python3-xlsxwriter 0.7.3-1 all Python 3 module for creating Excel XLSX files
ii python3.5 3.5.2-2ubuntu0~16.04.5 amd64 Interactive high-level object-oriented language (version 3.5)
ii python3.5-dev 3.5.2-2ubuntu0~16.04.5 amd64 Header files and a static library for Python (v3.5)
ii python3.5-minimal 3.5.2-2ubuntu0~16.04.5 amd64 Minimal subset of the Python language (version 3.5)
ii python3.6 3.6.7-1~16.04.york3 amd64 Interactive high-level object-oriented language (version 3.6)
ii python3.6-minimal 3.6.7-1~16.04.york3 amd64 Minimal subset of the Python language (version 3.6)
pierre@pierre-Inspiron-15-3567:~$
Hors ligne
#5 Le 17/03/2019, à 11:16
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Merci. Et le retour de
lsb_release -a
Tu n'as pas de 3.7 d'installé. N'as-tu pas confondu avec 2.7 (qui elle est présente sur ta machine) ?
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#6 Le 18/03/2019, à 08:07
- piter42
Re : "RESOLU"mise à jour python 3.7.2
Merci. Et le retour de
lsb_release -a
Tu n'as pas de 3.7 d'installé. N'as-tu pas confondu avec 2.7 (qui elle est présente sur ta machine) ?
pierre@pierre-Inspiron-15-3567:~$ lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
Hors ligne
#7 Le 18/03/2019, à 11:59
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Il n'y a pas de python 3.7 pour Xenial.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#8 Le 18/03/2019, à 23:14
- piter42
Re : "RESOLU"mise à jour python 3.7.2
Il n'y a pas de python 3.7 pour Xenial.
bonsoir,et le 3.6.7 comment je peux faire pour l utiliser à la place du 3.5 ?
merci
Hors ligne
#9 Le 18/03/2019, à 23:26
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Bonsoir,
retour de
python3.6 --version
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#10 Le 19/03/2019, à 07:36
- Compte supprimé
Re : "RESOLU"mise à jour python 3.7.2
Bonjour,
bonsoir,et le 3.6.7 comment je peux faire pour l utiliser à la place du 3.5 ?
merci
Si tu veux exécuter un script python depuis python3.6 ----> python3.6 ton_script.py
Si tu veux exécuter un script python depuis python3.5 ---->python3.5 ton_script.py
python ton_script exécutera quant à lui le script avec python 2.7 (par défaut sur la 16.04)
Ma réponse répond elle a ta demande ?
#11 Le 19/03/2019, à 10:13
- piter42
Re : "RESOLU"mise à jour python 3.7.2
Bonjour,
piter42 a écrit :bonsoir,et le 3.6.7 comment je peux faire pour l utiliser à la place du 3.5 ?
merciSi tu veux exécuter un script python depuis python3.6 ----> python3.6 ton_script.py
Si tu veux exécuter un script python depuis python3.5 ---->python3.5 ton_script.py
python ton_script exécutera quant à lui le script avec python 2.7 (par défaut sur la 16.04)Ma réponse répond elle a ta demande ?
bonjour ,
pas tout à fait ,ce que je veux c est que mon éditeur python(geany) exécute mes scripts par défaut avec la version 3.6.7 et non 3.5.2 pour que je puisse utiliser les f-strings
merci
Hors ligne
#12 Le 19/03/2019, à 10:22
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Bonjour,
De nouveau,
Bonsoir,
retour de
python3.6 --version
Il faut que tu adaptes le shebang sans doute : si la première ligne du script est /usr/bin/python3.6, est-ce ça marche comme tu veux ?
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#13 Le 19/03/2019, à 15:25
- piter42
Re : "RESOLU"mise à jour python 3.7.2
Bonjour,
De nouveau,
melixgaro a écrit :Bonsoir,
retour de
python3.6 --version
pierre@pierre-Inspiron-15-3567:~$ python3.6 --version Python 3.6.7 pierre@pierre-Inspiron-15-3567:~$
Il faut que tu adaptes le shebang sans doute : si la première ligne du script est /usr/bin/python3.6, est-ce ça marche comme tu veux ?
j ai essayé et rien y fait ?
Hors ligne
#14 Le 19/03/2019, à 16:15
- melixgaro
Re : "RESOLU"mise à jour python 3.7.2
Je ne connais pas geany. Mes scripts, je les exécute directement dans le terminal. Je ne peux que te conseille de chercher dans la doc de geany et dans les menus de ce logiciel où configurer l'interpréteur python.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#15 Le 19/03/2019, à 16:26
- Compte supprimé
Re : "RESOLU"mise à jour python 3.7.2
Bonjour,
Si tu exécutes ton script avec des f-string depuis un terminal via la commande python3.6 ton_script.py, tout se passe bien?
Si oui , il se peut effectivement que la version de ton éditeur Geany, ne supporte pas python 3.6.
Dans ce cas , il y a toujours une possibilité de partir sur une version plus récente
You might find newer versions in the Ubuntu Geany PPA at https://launchpad.net/~geany-dev/+archive/ppa.
...
#16 Le 19/03/2019, à 17:36
- piter42
Re : "RESOLU"mise à jour python 3.7.2
c est ok,j ai été dans "construire","définir les commandes" et dans "exécut" j ai rajouté ".6" à 3 et tout fonctionne .
encore merci
Dernière modification par piter42 (Le 19/03/2019, à 17:42)
Hors ligne