#1 Le 20/04/2021, à 23:31
- bouchra24
installation du matplotlib pour le python2
salut tout le monde
pouvez vous m'aider , j'arrive pas à installer le matplotlib pour python2, problème de compatibilité ?
je dois utiliser le python 2 et non pas le 3 car j'ai besoin d'installer le package sdf_helper qui ne marche pas avec le python3
bou@bou-ZenBook:~$ python2
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
bou@bou-ZenBook:~$ sudo apt-get install python-matplotlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-matplotlib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-matplotlib' has no installation candidate
bou@bou-ZenBook:~$
Hors ligne
#2 Le 20/04/2021, à 23:50
- beuguissime
Re : installation du matplotlib pour le python2
Bonjour,
Ça n'est plus possible sur ubuntu 20.04 ou ultérieures.
Hors ligne
#3 Le 21/04/2021, à 13:38
- bouchra24
Re : installation du matplotlib pour le python2
bonjour,
Ok je peux utiliser python3 mais j'arrive pas à installer package sdf_helper
ou@bou-ZenBook:~$ python3
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> import sdf_helper as sh
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sdf_helper'
>>>
bou@bou-ZenBook:~/epoch-4.17.14/epoch2d$ make sdfutils
make[1]: Entering directory '/home/bou/epoch-4.17.14/SDF/C'
gen_commit_string.sh: 41: [[: not found
gcc -c -Iinclude -Isrc -I../extension/include -fPIC -g -O3 -o obj_gcc/sdf_control.o src/sdf_control.c
rm -f lib/libsdfc.a
ar -rsu lib/libsdfc.a obj_gcc/sdf_control.o obj_gcc/sdf_derived.o obj_gcc/sdf_extension_util.o obj_gcc/sdf_helper.o obj_gcc/sdf_input.o obj_gcc/sdf_input_cartesian.o obj_gcc/sdf_input_point.o obj_gcc/sdf_input_station.o obj_gcc/sdf_modify.o obj_gcc/sdf_output.o obj_gcc/sdf_util.o obj_gcc/stack_allocator.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar: creating lib/libsdfc.a
ranlib lib/libsdfc.a
make[1]: Leaving directory '/home/bou/epoch-4.17.14/SDF/C'
gen_commit_string.sh: 41: [[: not found
./build: 62: -c: not found
./build: 78: setup.py: not found
make: *** [Makefile:418: sdfutils] Error 1
bou@bou-ZenBook:~/epoch-4.17.14/epoch2d$
comment je peut résoudre ce problème svp?
Hors ligne
#4 Le 21/04/2021, à 14:01
- beuguissime
Re : installation du matplotlib pour le python2
Bonjour,
C'est quoi epoch-4.17.14 et epoch2d ?
Tu reviens sans cesse avec le même problème si j'en crois tes discussions passées mais faute de détails, personne ne peut t'aider jusqu'au bout.
Si tu ne peux en dire plus sur ce forum, il faut demander de l'aide à tes collègues/responsables.
Hors ligne
#5 Le 21/04/2021, à 14:06
- bouchra24
Re : installation du matplotlib pour le python2
epoch c'est le code que j'utilise , pour avoir le sdf_helper je dois l'installer dans un des repertoires du code
est ce que je peux installer ce package autrement?
merci beaucoup de ton aide
Hors ligne
#6 Le 21/04/2021, à 14:14
- beuguissime
Re : installation du matplotlib pour le python2
J'ai bien compris que c'est le code que tu utilises. Je voudrais un lien vers le site officiel du projet, où l'on trouve le tar.gz la documentation etc.
Hors ligne
#7 Le 21/04/2021, à 15:15
- bouchra24
Re : installation du matplotlib pour le python2
https://github.com/Warwick-Plasma/epoch
pour avoir le sdf_helper voila comment on doit procéder:
Dernière modification par bouchra24 (Le 22/04/2021, à 17:49)
Hors ligne
#8 Le 22/04/2021, à 17:50
- bouchra24
Re : installation du matplotlib pour le python2
salut
quelqu'un ; il a une idée pour régler ce problème
merci beaucoup
Hors ligne