[Résolu n°2] Un problème avec Ipython3
Moderator: Laurent85
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
[Résolu n°2] Un problème avec Ipython3
Bonjour.
J'ai installé ipython3 (le notebook) via synaptic, mais quand je le lance, un shell s'ouvre puis se ferme immédiatement. Pas le temps de faire du python !
Je ne sais pas quel est le problème, peut-être ai-je fait une erreur (?) dans l'installation.
Je joins une image des paquets installés : Merci pour votre aide si vous avez une idée.
Belle journée à tous (et toutes).
JP
J'ai installé ipython3 (le notebook) via synaptic, mais quand je le lance, un shell s'ouvre puis se ferme immédiatement. Pas le temps de faire du python !
Je ne sais pas quel est le problème, peut-être ai-je fait une erreur (?) dans l'installation.
Je joins une image des paquets installés : Merci pour votre aide si vous avez une idée.
Belle journée à tous (et toutes).
JP
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Un problème avec Ipython3
Bonjour JP,
Il se passe quoi quand tu le lances d'un terminal, des messages ?
Il se passe quoi quand tu le lances d'un terminal, des messages ?
Code: Select all
ipython notebook
Re: Un problème avec Ipython3
Salut Laurent.
J'ai écrit un peu vite le message précédent. Il s'agit bien de la version ipython3 classique (et pas le notebook) qui pose problème.
Autant la version pour python2 démarre sans souci, autant il ne semble pas trouver la version 3, alors qu'elle semble installée (d'après Synaptic) :
Voilà.
Merci !
Bon week-end.
JP
J'ai écrit un peu vite le message précédent. Il s'agit bien de la version ipython3 classique (et pas le notebook) qui pose problème.
Autant la version pour python2 démarre sans souci, autant il ne semble pas trouver la version 3, alors qu'elle semble installée (d'après Synaptic) :
Voilà.
Merci !
Bon week-end.
JP
Re: Un problème avec Ipython3
Quel est le retour de :
Code: Select all
ls -adl /usr/lib/*/dist-packages/IPython/*
du -sc /usr/lib/*/dist-packages/IPython
Re: Un problème avec Ipython3
Ça donne ça :
Code: Select all
jpp@jpp-System-Product-Name ~ $ ls -adl /usr/lib/*/dist-packages/IPython/*
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/config
-rw-r--r-- 1 root root 14989 févr. 9 2015 /usr/lib/python2.7/dist-packages/IPython/consoleapp.py
-rw-r--r-- 1 root root 11900 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/consoleapp.pyc
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/core
-rw-r--r-- 1 root root 638 févr. 9 2015 /usr/lib/python2.7/dist-packages/IPython/display.py
-rw-r--r-- 1 root root 291 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/display.pyc
drwxr-xr-x 2 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/extensions
drwxr-xr-x 11 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/external
-rw-r--r-- 1 root root 3192 févr. 9 2015 /usr/lib/python2.7/dist-packages/IPython/frontend.py
-rw-r--r-- 1 root root 2062 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/frontend.pyc
drwxr-xr-x 10 root root 4096 août 31 21:21 /usr/lib/python2.7/dist-packages/IPython/html
-rw-r--r-- 1 root root 5677 févr. 9 2015 /usr/lib/python2.7/dist-packages/IPython/__init__.py
-rw-r--r-- 1 root root 5092 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/__init__.pyc
drwxr-xr-x 7 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/kernel
drwxr-xr-x 2 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/lib
-rw-r--r-- 1 root root 464 févr. 9 2015 /usr/lib/python2.7/dist-packages/IPython/__main__.py
-rw-r--r-- 1 root root 270 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/__main__.pyc
drwxr-xr-x 9 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/nbconvert
drwxr-xr-x 6 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/nbformat
drwxr-xr-x 6 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/parallel
drwxr-xr-x 3 root root 4096 sept. 5 18:29 /usr/lib/python2.7/dist-packages/IPython/qt
drwxr-xr-x 2 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/sphinxext
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/terminal
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/testing
drwxr-xr-x 2 root root 4096 mai 21 2018 /usr/lib/python2.7/dist-packages/IPython/utils
drwxr-xr-x 4 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/config
-rw-r--r-- 1 root root 14989 févr. 9 2015 /usr/lib/python3/dist-packages/IPython/consoleapp.py
drwxr-xr-x 4 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/core
-rw-r--r-- 1 root root 638 févr. 9 2015 /usr/lib/python3/dist-packages/IPython/display.py
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/extensions
drwxr-xr-x 12 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/external
-rw-r--r-- 1 root root 3192 févr. 9 2015 /usr/lib/python3/dist-packages/IPython/frontend.py
drwxr-xr-x 11 root root 4096 sept. 5 18:27 /usr/lib/python3/dist-packages/IPython/html
-rw-r--r-- 1 root root 5677 févr. 9 2015 /usr/lib/python3/dist-packages/IPython/__init__.py
drwxr-xr-x 8 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/kernel
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/lib
-rw-r--r-- 1 root root 464 févr. 9 2015 /usr/lib/python3/dist-packages/IPython/__main__.py
drwxr-xr-x 10 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/nbconvert
drwxr-xr-x 7 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/nbformat
drwxr-xr-x 7 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/parallel
drwxr-xr-x 2 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/__pycache__
drwxr-xr-x 4 root root 4096 août 30 21:30 /usr/lib/python3/dist-packages/IPython/qt
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/sphinxext
drwxr-xr-x 4 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/terminal
drwxr-xr-x 4 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/testing
drwxr-xr-x 3 root root 4096 mai 21 2018 /usr/lib/python3/dist-packages/IPython/utils
jpp@jpp-System-Product-Name ~ $ du -sc /usr/lib/*/dist-packages/IPython
9152 /usr/lib/python2.7/dist-packages/IPython
9240 /usr/lib/python3/dist-packages/IPython
18392 total
Re: Un problème avec Ipython3
C'est une énigme. IPython est installé, le chemin du module est correct pourtant python3 dit ne pas le trouver.
python3 fonctionne ?
Ça ne marche pas en démarrant ipython3 à partir d'une console python3 ?
python3 fonctionne ?
Code: Select all
python3
Code: Select all
python3
>>> from IPython import start_ipython
>>> start_ipython()
Re: Un problème avec Ipython3
Voici ce que j'obtiens :
Je m'interroge : n'y a -t-il pas un conflit entre deux versions de Python3 installées ? Et ce serait ça qui mettrait le bazar ?
Peut-être faut-il remettre de l'ordre dans tout ça ?
Qu'en penses-tu ?
JP
Je m'interroge : n'y a -t-il pas un conflit entre deux versions de Python3 installées ? Et ce serait ça qui mettrait le bazar ?
Peut-être faut-il remettre de l'ordre dans tout ça ?
Qu'en penses-tu ?
JP
Re: Un problème avec Ipython3
Ça doit être la bonne piste.
La commande from..., c'est avec 2 majuscules pour IPython :
Code: Select all
>>> from IPython import start_ipython
>>> start_ipython()
Re: Un problème avec Ipython3
Bingo :
ipython3 démarre avec python3.5 qui doit être la version installée avec le dépot de linuxmint (?).
Par contre la commande ipython3 envoie vers la version de python3 la plus récente semble-t-il : python3.7 (installée depuis la source python)
Que proposes-tu ?
-> désinstaller cette version 3.7 ? Et si oui qu'est-ce que je tape ?
-> faire comprendre au système que si je tape ipython3, il doit aller vers la version 3.5 ?
-> installer ipython3 dans la version 3.7 ? Comment ?
-> autre chose peut-être ...
Merci Laurent, le IPython avec 2 majuscules, mon cerveau ne le voyait même pas !!!
JP
ipython3 démarre avec python3.5 qui doit être la version installée avec le dépot de linuxmint (?).
Par contre la commande ipython3 envoie vers la version de python3 la plus récente semble-t-il : python3.7 (installée depuis la source python)
Que proposes-tu ?
-> désinstaller cette version 3.7 ? Et si oui qu'est-ce que je tape ?
-> faire comprendre au système que si je tape ipython3, il doit aller vers la version 3.5 ?
-> installer ipython3 dans la version 3.7 ? Comment ?
-> autre chose peut-être ...
Merci Laurent, le IPython avec 2 majuscules, mon cerveau ne le voyait même pas !!!
JP
Re: Un problème avec Ipython3
Oula !!!
J'ai un gros doute ...
Si je lance IPython depuis Python3.5, je me retrouve avec ipython2.4.1. Ça ne veut pas dire que je suis en python2 ???
Ce n'est pas bien clair ...
J'ai un gros doute ...
Si je lance IPython depuis Python3.5, je me retrouve avec ipython2.4.1. Ça ne veut pas dire que je suis en python2 ???
Ce n'est pas bien clair ...
Re: Un problème avec Ipython3
Une modification la plus neutre possible.
Copie et modifie le script qui lance ipython3 pour qu'il utilise la version spécifique python 3.5 :
Code: Select all
sudo cp /usr/bin/ipython3 /usr/local/bin
sudo xed /usr/local/bin/ipython3
Code: Select all
#!/usr/bin/env python3.5
Re: Un problème avec Ipython3
Salut Laurent.
La manip a bien fonctionné. ipython3 est maintenant bien accessible directement depuis le shell.
La seule chose que je voudrais comprendre : il y a deux paquets ipython dans les dépots (pour chaque version de python), mais c'est la même version ipython2.4.1 qui apparaît. Le n° de version d'ipython n'a donc rien à voir avec la version de python utilisée.
J'imagine que ce ne sont pas les mêmes équipes qui développent.
Un exemple avec un calcul d'intégrale :
En tout cas une fois de plus merci. Une intervention a minima, parfait. Less is more !
Bonne journée.
JP
La manip a bien fonctionné. ipython3 est maintenant bien accessible directement depuis le shell.
La seule chose que je voudrais comprendre : il y a deux paquets ipython dans les dépots (pour chaque version de python), mais c'est la même version ipython2.4.1 qui apparaît. Le n° de version d'ipython n'a donc rien à voir avec la version de python utilisée.
J'imagine que ce ne sont pas les mêmes équipes qui développent.
Un exemple avec un calcul d'intégrale :
En tout cas une fois de plus merci. Une intervention a minima, parfait. Less is more !
Bonne journée.
JP
Re: Un problème avec Ipython3
J'avais oublier de répondre là-dessus c'est ça effectivement.
C'est moins mal de tête avec pythonUn exemple avec un calcul d'intégrale :
Bonne journée à toi
Re: Un problème avec Ipython3
Re-bonjour Laurent.
Suite à l'upgrade de Mint 18.3 vers Mint 19, puis la mise à niveau vers 19.3, je constate que Ipython3 ne fonctionne plus.
J'ai tenté la manip que tu m'avais proposée le 9 septembre dernier, mais ça n'a rien donné ...
Si je fais tes deux commandes :
... et que je remplace la première ligne par ça :
J'obtiens ça dans la console :
Que se passe-t-il ? D'ailleurs, depuis cette manip, ipython ne fonctionne plus non plus
Merci pour ton aide.
Bonne journée.
JP
Suite à l'upgrade de Mint 18.3 vers Mint 19, puis la mise à niveau vers 19.3, je constate que Ipython3 ne fonctionne plus.
J'ai tenté la manip que tu m'avais proposée le 9 septembre dernier, mais ça n'a rien donné ...
Si je fais tes deux commandes :
Code: Select all
sudo cp /usr/bin/ipython3 /usr/local/bin
sudo xed /usr/local/bin/ipython3
Code: Select all
#!/usr/bin/env python3.5
Code: Select all
** (xed:9764): WARNING **: 16:17:21.394: Set document metadata failed: La définition de l’attribut metadata::xed-spell-language n’est pas prise en charge
** (xed:9764): WARNING **: 16:17:21.394: Set document metadata failed: La définition de l’attribut metadata::xed-encoding n’est pas prise en charge
** (xed:9764): WARNING **: 16:17:26.018: Set document metadata failed: La définition de l’attribut metadata::xed-position n’est pas prise en charge
Merci pour ton aide.
Bonne journée.
JP
Re: Un problème avec Ipython3
Bonjour JP,
Les messages concernent xed l'éditeur, j'ignore pourquoi mais c'est sans conséquence. J'ai testé ipython3 sur LM 19.3 ça marche. Quel est le retour de
Les messages concernent xed l'éditeur, j'ignore pourquoi mais c'est sans conséquence. J'ai testé ipython3 sur LM 19.3 ça marche. Quel est le retour de
Code: Select all
/usr/bin/ipython3
Re: Un problème avec Ipython3
!?!?
Alors j'ai installé le paquet ipython avec Synaptic, sans succès ...
J'ai ça installé, il manque quelque chose ?
Code: Select all
jpp@jpp-System-Product-Name ~ $ /usr/bin/ipython3
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'IPython'
J'ai ça installé, il manque quelque chose ?
Re: Un problème avec Ipython3
En parcourant à nouveau le fil de discussion il y avait à l'origine du problème une version de python provenant d'un dépôt externe.
Code: Select all
apt search ~i'python3$' ~i'python3\.'
Re: Un problème avec Ipython3
Code: Select all
jpp@jpp-System-Product-Name ~ $ apt search ~i'python3$' ~i'python3\.'
i bpython3 - fancy interface to the Python 3 interprete
i A hexchat-python3 - Python 3 plugin for HexChat
i A idle-python3.6 - IDE for Python (v3.6) using Tkinter
i ipython3 - Enhanced interactive Python 3 shell
i libpython3.5 - Shared Python runtime library (version 3.5
i libpython3.5-dbg - Debug Build of the Python Interpreter (ver
i libpython3.5-dev - Header files and a static library for Pyth
i libpython3.5-minimal - Minimal subset of the Python language (ver
i libpython3.5-stdlib - Interactive high-level object-oriented lan
i A libpython3.6 - Shared Python runtime library (version 3.6
i A libpython3.6-dbg - Debug Build of the Python Interpreter (ver
i A libpython3.6-dev - Header files and a static library for Pyth
i A libpython3.6-minimal - Minimal subset of the Python language (ver
i A libpython3.6-stdlib - Interactive high-level object-oriented lan
i python3 - interactive high-level object-oriented lan
i python3.5 - Interactive high-level object-oriented lan
i python3.5-dbg - Debug Build of the Python Interpreter (ver
i python3.5-dev - Header files and a static library for Pyth
i python3.5-minimal - Minimal subset of the Python language (ver
i A python3.6 - Interactive high-level object-oriented lan
i A python3.6-dbg - Debug Build of the Python Interpreter (ver
i A python3.6-dev - Header files and a static library for Pyth
i A python3.6-minimal - Minimal subset of the Python language (ver
Re: Un problème avec Ipython3
La version python 3.5 installée provenant d'une autre source est la cause du dysfonctionnement. Elle sert à quoi d'ailleurs ?
Procède de cette façon :
Modifie la ligne comme suit:
Procède de cette façon :
Code: Select all
sudo cp /usr/bin/ipython3 /usr/local/bin
xed admin:/usr/local/bin/ipython3
Code: Select all
VERSION="3.6"
Re: Un problème avec Ipython3
Bravo Laurent !
Ça fonctionne :
Je ne sais plus pourquoi j'ai cette version de python 3.5 ???
Comment puis-je m'en débarasser ?
Ça fonctionne :
Je ne sais plus pourquoi j'ai cette version de python 3.5 ???
Comment puis-je m'en débarasser ?