#1 Le 02/12/2019, à 15:06
- Thais26
Problème pour obtenir numpy et scipy
Bonjour!
Je souhaite avoir les modules numpy et scipy sur Python mais je n'y parviens pas.
Voici ce que j'ai fait :
- J'ai téléchargé pip avec la commande : sudo apt-get install python3-pip
- Puis j'ai voulu télécharger numpy avec la commande : sudo pip install numpy
Mais ça m'affiche :
The directory '/home/lucie/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/lucie/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in ./.local/lib/python2.7/site-packages
- Pourtant, si j'effectue la commande : sudo apt-get install python3-numpy, le terminal me dit que je l'ai déjà et que c'est bien la version la plus récente.
Dans tous les cas, lorsque j'écris "import numpy" dans Python, il apparaît souligné en rouge et je ne peux donc pas l'utiliser... Et c'est la même chose pour scipy.
Quelqu'un aurait-il une solution et m'expliquer ce que j'ai mal réalisé ?
Merci d'avance
Hors ligne
#2 Le 02/12/2019, à 15:43
- xubu1957
Re : Problème pour obtenir numpy et scipy
Bonjour,
En regardant cette discussion > problème d'installation de python-numpy python-scipy [RÉSOLU]
Montre, en te servant du Retour utilisable de commande :
find /etc/apt -type f -name '*.list*' -exec bash -c 'echo -e "\n$1\n"; nl -ba "$1"' _ '{}' \;
Méthode détaillée :
Bonjour,
Entrer des commandes dans un terminal et donner le résultat - Voilà la marche à suivre :
Ouvre le terminal avec ctrl-alt-t
Sélectionne la commande voulue avec un triple clic (ça sélectionne toute la ligne, même la fin si on ne la voit pas)
Colle-la dans le terminal avec un clic molette, valide avec Entrée
Sélectionne et copie tout ce que te dit le terminal depuis la commande jusqu'à la dernière ligne incluse
Clique sur le <> de l'éditeur de message
Colle là où se trouve le curseur (entre le ] et le [)
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne
#3 Le 02/12/2019, à 15:59
- melixgaro
Re : Problème pour obtenir numpy et scipy
Bonjour,
En plus de la demande de xubu, peux-tu faire le test décrit en fin de ce message ?
sauf besoin spécifique, numpy et scipy s'installent via apt
sudo apt install --no-install-recommends python3-numpy python3-scipy
Je rappelle que python2 est en fin de vie. Ce n'est pas pip mais pip3 qu'il faut utiliser pour installer des modules depuis pypi.
Si tu veux t'assurer de la bonne installation, lance dans un terminal
python3
puis tape successivement
import numpy
import scipy
Copie-colle le retour terminal ici stp.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#4 Le 02/12/2019, à 16:48
- Thais26
Re : Problème pour obtenir numpy et scipy
xubu1957, voici ce que m'affiche le terminal:
/etc/apt/sources.list.save
1 #deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted
2
3 # See [url]http://help.ubuntu.com/community/UpgradeNotes[/url] for how to upgrade to
4 # newer versions of the distribution.
5 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic main restricted
6 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates main restricted
11 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic universe
17 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic universe
18 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates universe
19 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic multiverse
27 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic multiverse
28 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates multiverse
29 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-backports main restricted universe multiverse
37 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb [url]http://archive.canonical.com/ubuntu[/url] cosmic partner
44 # deb-src [url]http://archive.canonical.com/ubuntu[/url] cosmic partner
45
46 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security main restricted
47 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security main restricted
48 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security universe
49 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security universe
50 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security multiverse
51 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security multiverse
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
/etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
1 deb [url]http://ppa.launchpad.net/deadsnakes/ppa/ubuntu[/url] cosmic main
2 # deb-src [url]http://ppa.launchpad.net/deadsnakes/ppa/ubuntu[/url] cosmic main
/etc/apt/sources.list
1 # deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted
2
3 # See [url]http://help.ubuntu.com/community/UpgradeNotes[/url] for how to upgrade to
4 # newer versions of the distribution.
5 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic main restricted
6 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates main restricted
11 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic universe
17 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic universe
18 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates universe
19 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic multiverse
27 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic multiverse
28 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates multiverse
29 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 deb [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-backports main restricted universe multiverse
37 # deb-src [url]http://fr.archive.ubuntu.com/ubuntu/[/url] cosmic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb [url]http://archive.canonical.com/ubuntu[/url] cosmic partner
44 # deb-src [url]http://archive.canonical.com/ubuntu[/url] cosmic partner
45
46 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security main restricted
47 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security main restricted
48 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security universe
49 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security universe
50 deb [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security multiverse
51 # deb-src [url]http://security.ubuntu.com/ubuntu[/url] cosmic-security multiverse
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
Et melixgaro, j'ai effectué la commande et ça ne m'affiche rien.
En fait, j'ai finalement réussi à importer numpy et scipy depuis Pycharm dans les "settings".
Quelle commande faut-il taper pour obtenir pip3 ?
Dernière modification par Thais26 (Le 02/12/2019, à 17:17)
Hors ligne
#5 Le 02/12/2019, à 16:52
- xubu1957
Re : Problème pour obtenir numpy et scipy
Pour ajouter toi-même les balises code à ton précédent message #4 : Merci
_ _ _
La version 18.10 cosmic est périmée.
Depuis le 18 juillet 2019, Ubuntu 18.10 est en fin de vie (end of life, EOL). Elle ne profite plus de nouvelle mise à jour de sécurité et les paquets logiciels pour cette version sont déplacés dans des serveurs d'archive.
Dernière modification par xubu1957 (Le 02/12/2019, à 17:23)
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne
#6 Le 02/12/2019, à 16:53
- melixgaro
Re : Problème pour obtenir numpy et scipy
Et melixgaro, j'ai effectué la commande et ça ne m'affiche rien.
Quelle commande ? J'en évoque plusieurs.
Je te demande d'ouvrir un terminal de lancer
python3
puis de faire
import nupy
et
import scipy
Copie-colle le retour du terminal ici.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#7 Le 02/12/2019, à 16:56
- Thais26
Re : Problème pour obtenir numpy et scipy
Voilà ce que ça me donne :
Python 3.6.8 (default, Apr 9 2019, 04:59:38)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import scipy
>>>
Hors ligne
#8 Le 02/12/2019, à 17:04
- melixgaro
Re : Problème pour obtenir numpy et scipy
Merci ! Donc tes modules sont bien installés et trouvés par python3.
pip3 s'installe avec python3-pip (de mémoire). Comme ta version d'ubuntu, cosmic, est périmée (merci xubu), ça sera compliqué d'installer des paquets manquants. Et ça veut dire aussi plus de màj de sécurité (ce qui est critique pour des logiciels comme ton navigateur internet).
Songe à sauvegarder tes données et à réinstaller une version récente ou la dernière LTS (18.04).
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#9 Le 02/12/2019, à 17:10
- Thais26
Re : Problème pour obtenir numpy et scipy
D'accord, alors je vais faire une mise à jour de mon ordinateur! Merci à vous deux!
Mais en attendant, lorsque je tape la commande :
sudo pip3 install numpy
Il m'affiche :
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
Est-ce que cela vient du fait que je n'ai pas encore fait la mise à jour?
Hors ligne
#10 Le 02/12/2019, à 17:29
- melixgaro
Re : Problème pour obtenir numpy et scipy
D'après cette question, que je viens de lire en diagonale, c'est pare que tu as tenté une màj de pip3 via la commande pip3 alors que sur ubuntu, c'est apt qui s'occupe de la màj. Si le cas décrit s'applique à toi, alors tu as cassé pip3 sur ta machine.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#11 Le 02/12/2019, à 19:55
- Thais26
Re : Problème pour obtenir numpy et scipy
Ah mince... Et il n'y a pas moyen de réparer ça ?
Hors ligne
#12 Le 02/12/2019, à 20:04
- melixgaro
Re : Problème pour obtenir numpy et scipy
Faut désinstaller et réinstaller le paquet (je pense que ça suffira) mais tu te heurtes alors au problème relevé par xubu, à savoir la désactivation des dépôts cosmic.
Il faut modifier tes sources de dépôts pour basculer sur les serveurs old-release (voir la doc). Puis
poiur recharger la liste des paquets
sudo apt update
si la commande ci-dessus s'exécute sans erreur
sudo apt remove --purge python3-pip
(si trop de dépendances (donc plus que 3) sont enlevées, ne pas valider la désinstallation et venir ici pour un point d'étape)
et enfin
sudo apt install python3-pip
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#13 Le 02/12/2019, à 20:13
- Thais26
Re : Problème pour obtenir numpy et scipy
Merci! J'ai fait la première commande et il m'affiche ça :
Atteint:1 http://fr.archive.ubuntu.com/ubuntu cosmic InRelease
Ign:2 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic InRelease
Atteint:3 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Atteint:4 http://fr.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Atteint:5 http://fr.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic Release
404 Not Found [IP : 91.189.95.83 80]
Lecture des listes de paquets... Fait
E: Le dépôt http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
Est-ce que je continue avec les deux commandes suivantes ?
Hors ligne
#14 Le 02/12/2019, à 20:19
- melixgaro
Re : Problème pour obtenir numpy et scipy
Désolé, je n'ai pas été assez clair. L'étape 0, c'est ça, en gras
Faut désinstaller et réinstaller le paquet (je pense que ça suffira) mais tu te heurtes alors au problème relevé par xubu, à savoir la désactivation des dépôts cosmic.
Il faut modifier tes sources de dépôts pour basculer sur les serveurs old-release (voir la doc). Puis
L'erreur que tu as est explquée par la première phrase de la citation.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#15 Le 02/12/2019, à 20:31
- melixgaro
Re : Problème pour obtenir numpy et scipy
Tu peux y arriver comme ceci
Pour basculer sur les old-releases
sudo sed -i.bak 's+http://\(fr.archive\|security\).ubuntu.com+http://old-releases.ubuntu.com+g' /etc/apt/sources.list
(pour info, ça revient à faire ce qui est décrit au paragraphe 1 de cette page)
Pour désactiver le PPA obsolète
sudo sed 's+^deb+^# deb+g' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
Puis pour vérifier
nl -ba /etc/apt/sources.list
Puis
sudo apt update
Donne tous ces retours et on voit pour la suite.
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#16 Le 02/12/2019, à 21:34
- Thais26
Re : Problème pour obtenir numpy et scipy
Alors, la deuxième commande me donne :
^# deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic main
# deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic main
La troisième :
1 # deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted
2
3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
4 # newer versions of the distribution.
5 deb http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
6 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
11 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb http://old-releases.ubuntu.com/ubuntu/ cosmic universe
17 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic universe
18 deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
19 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
27 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
28 deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
29 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 deb http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
37 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb http://archive.canonical.com/ubuntu cosmic partner
44 # deb-src http://archive.canonical.com/ubuntu cosmic partner
45
46 deb http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
47 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
48 deb http://old-releases.ubuntu.com/ubuntu cosmic-security universe
49 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security universe
50 deb http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
51 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
Et enfin la quatrième :
Ign:1 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic InRelease
Ign:2 http://old-releases.ubuntu.com/ubuntu cosmic InRelease
Err:3 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic Release
404 Not Found [IP : 91.189.95.83 80]
Ign:4 http://old-releases.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:5 http://old-releases.ubuntu.com/ubuntu cosmic-backports InRelease
Ign:6 http://old-releases.ubuntu.com/ubuntu cosmic-security InRelease
Err:7 http://old-releases.ubuntu.com/ubuntu cosmic Release
404 Not Found [IP : 91.189.88.153 80]
Err:8 http://old-releases.ubuntu.com/ubuntu cosmic-updates Release
404 Not Found [IP : 91.189.88.153 80]
Err:9 http://old-releases.ubuntu.com/ubuntu cosmic-backports Release
404 Not Found [IP : 91.189.88.153 80]
Err:10 http://old-releases.ubuntu.com/ubuntu cosmic-security Release
404 Not Found [IP : 91.189.88.153 80]
Lecture des listes de paquets... Fait
E: Le dépôt http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
E: Le dépôt http://old-releases.ubuntu.com/ubuntu cosmic Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
E: Le dépôt http://old-releases.ubuntu.com/ubuntu cosmic-updates Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
E: Le dépôt http://old-releases.ubuntu.com/ubuntu cosmic-backports Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
E: Le dépôt http://old-releases.ubuntu.com/ubuntu cosmic-security Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
Merci beaucoup pour votre temps.
Hors ligne
#17 Le 02/12/2019, à 21:52
- melixgaro
Re : Problème pour obtenir numpy et scipy
Ah, c'est ma faute pour la 2ème si ça n'a pas marché
sudo sed -i.bak 's+^deb+^# deb+g' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
puis
sudo sed -i '10s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '18s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '28s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '36s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '46s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '48s/^.*/# \0/' /etc/apt/sources.list
sudo sed -i '50s/^.*/# \0/' /etc/apt/sources.list
(si succès, ça ne retourne rien ; donc ne copie-colle que les cas ça retourne qque chose)
puis
nl -ba /etc/apt/sources.list
puis
sudo apt update
et on refait un point d'étape
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#18 Le 02/12/2019, à 22:17
- Thais26
Re : Problème pour obtenir numpy et scipy
Donc cette fois-ci, pour la deuxième commande, j'ai :
list.d/deadsnakes-ubuntu-ppa-cosmic.list
Ensuite, toutes ces commandes ne me renvoient effectivement rien.
Puis, lorsque j'affiche la liste j'ai :
1 # deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted
2
3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
4 # newer versions of the distribution.
5 deb http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
6 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
11 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb http://old-releases.ubuntu.com/ubuntu/ cosmic universe
17 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic universe
18 # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
19 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
27 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
28 # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
29 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
37 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb http://archive.canonical.com/ubuntu cosmic partner
44 # deb-src http://archive.canonical.com/ubuntu cosmic partner
45
46 # deb http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
47 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
48 # deb http://old-releases.ubuntu.com/ubuntu cosmic-security universe
49 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security universe
50 # deb http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
51 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
Et enfin la dernière commande :
E: Ligne 1 mal formée dans la liste des sources /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list (type)
E: La liste des sources ne peut être lue.
Hors ligne
#19 Le 02/12/2019, à 22:26
- melixgaro
Re : Problème pour obtenir numpy et scipy
Je pense que tu as mal copié-collé la commande 1 du message 17.
Refais et stp copie-colle le retour COMPLET ou le retour utilisable de commande, c'est-à-dire depuis la ligne contenant la commande que tu tapes jusqu'à la ligne vide qui suit le retour de la commande.
Refais ensuite
sudo apt update
(idem avec retour COMPLET).
Par exemple, avec la commande suivante
echo un exemple
j'attends le retour
melixgaro@ordi:~$ echo un exemple
un exemple
melixgaro@ordi:~$
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#20 Le 02/12/2019, à 22:34
- Thais26
Re : Problème pour obtenir numpy et scipy
Ah d'accord! Voilà :
lucie@lucie-Latitude-5480:~$ sudo sed -i.bak 's+^deb+^# deb+g' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
[sudo] Mot de passe de lucie :
lucie@lucie-Latitude-5480:~$ sudo sed -i '10s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '18s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '28s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '36s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '46s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '48s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ sudo sed -i '50s/^.*/# \0/' /etc/apt/sources.list
lucie@lucie-Latitude-5480:~$ nl -ba /etc/apt/sources.list
1 # deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted
2
3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
4 # newer versions of the distribution.
5 deb http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
6 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 # # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
11 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb http://old-releases.ubuntu.com/ubuntu/ cosmic universe
17 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic universe
18 # # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
19 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
27 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic multiverse
28 # # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
29 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 # # deb http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
37 # deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb http://archive.canonical.com/ubuntu cosmic partner
44 # deb-src http://archive.canonical.com/ubuntu cosmic partner
45
46 # # deb http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
47 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security main restricted
48 # # deb http://old-releases.ubuntu.com/ubuntu cosmic-security universe
49 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security universe
50 # # deb http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
51 # deb-src http://old-releases.ubuntu.com/ubuntu cosmic-security multiverse
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
lucie@lucie-Latitude-5480:~$ sudo apt update
E: Ligne 1 mal formée dans la liste des sources /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list (type)
E: La liste des sources ne peut être lue.
lucie@lucie-Latitude-5480:~$
(Ça renvoie la même chose)
Hors ligne
#21 Le 02/12/2019, à 22:40
- melixgaro
Re : Problème pour obtenir numpy et scipy
Ok, merci. Bon on va regarder ce qu'il y a dans le fichier
nl -ba /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#22 Le 02/12/2019, à 22:45
- Thais26
Re : Problème pour obtenir numpy et scipy
Voici :
lucie@lucie-Latitude-5480:~$ nl -ba /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
1 ^# deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic main
2 # deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu cosmic main
lucie@lucie-Latitude-5480:~$
Hors ligne
#23 Le 02/12/2019, à 22:50
- melixgaro
Re : Problème pour obtenir numpy et scipy
ah ok
alors ça
sudo sed -i '1s/^.//g' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
puis
sudo apt update
Linux depuis ~2007. Xubuntu seulement.
Hors ligne
#24 Le 02/12/2019, à 22:54
- Thais26
Re : Problème pour obtenir numpy et scipy
lucie@lucie-Latitude-5480:~$ sudo sed -i '1s/^.//g' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-cosmic.list
[sudo] Mot de passe de lucie :
lucie@lucie-Latitude-5480:~$ sudo apt update
Ign:1 http://old-releases.ubuntu.com/ubuntu cosmic InRelease
Err:2 http://old-releases.ubuntu.com/ubuntu cosmic Release
404 Not Found [IP : 91.189.88.153 80]
Lecture des listes de paquets... Fait
E: Le dépôt http://old-releases.ubuntu.com/ubuntu cosmic Release n'a pas de fichier Release.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.
lucie@lucie-Latitude-5480:~$
Hors ligne
#25 Le 02/12/2019, à 22:56
- xubu1957
Re : Problème pour obtenir numpy et scipy
@melixgaro
This PPA currently publishes packages for Bionic, Xenial, and Trusty.
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci. Membre de Linux-Azur
Hors ligne