Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#51 Le 14/02/2020, à 21:19

bouchra24

Re : installer les packages de python3

à xubu et melixgaro j'ai installé mpich, merci beaucoup pour votre aide, vous étes hyper gentil

Hors ligne

#52 Le 14/02/2020, à 21:28

bouchra24

Re : installer les packages de python3

plasma@phy:~/epoch-4.17.10/epoch2d$ make sdfutils
make[1]: Entering directory '/home/plasma/epoch-4.17.10/SDF/C'
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/plasma/epoch-4.17.10/SDF/C'
Unable to build python module. Numpy directory not found.
Makefile:417: recipe for target 'sdfutils' failed
make: *** [sdfutils] Error 1
plasma@phy:~/epoch-4.17.10/epoch2d$ 

maintenant je veux installer numpy library , laquel de ces commandes me permet de l'installer correctement:

sudo apt install python3-numpy

     

python3 -c "import numpy; print(numpy.__version__)"

Hors ligne

#53 Le 14/02/2020, à 22:09

melixgaro

Re : installer les packages de python3

Attends, pas si vite.

maintenant donne le retour de (en un seul morceau stp, pas dans plusieurs boîte [ code ], comme tu fais de temps en temps)

sudo apt update

Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#54 Le 14/02/2020, à 22:12

bouchra24

Re : installer les packages de python3

plasma@phy:~$ sudo apt update
[sudo] password for plasma: 
Sorry, try again.
[sudo] password for plasma: 
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:2 http://dz.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:3 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
Hit:4 http://dz.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://dz.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
plasma@phy:~$ 

Hors ligne

#55 Le 14/02/2020, à 22:16

melixgaro

Re : installer les packages de python3

normalement numpy est déjà installé sur ta machine

refais pour t'en assurer

sudo apt install python3-numpy

il te faut peut-être numpy pour python2.7, comme ceci

sudo apt install python-numpy

Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#56 Le 14/02/2020, à 22:52

bouchra24

Re : installer les packages de python3

je veux installer sdf readers dans le python
sdf_python.c:38:10: fatal error: Python.h: No such file or directory
#include <Python.h>
, j'ai compris ou se situe le problème exactement?

plasma@phy:~/epoch-4.17.10/epoch2d$ make sdfutils
make[1]: Entering directory '/home/plasma/epoch-4.17.10/SDF/C'
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/plasma/epoch-4.17.10/SDF/C'
running build
running build_py
creating pybuild
creating pybuild/lib.linux-x86_64-2.7
copying sdf_legacy.py -> pybuild/lib.linux-x86_64-2.7
creating pybuild/lib.linux-x86_64-2.7/sdf_helper
copying sdf_helper/visit_cmap.py -> pybuild/lib.linux-x86_64-2.7/sdf_helper
copying sdf_helper/sdf_helper.py -> pybuild/lib.linux-x86_64-2.7/sdf_helper
copying sdf_helper/_version.py -> pybuild/lib.linux-x86_64-2.7/sdf_helper
copying sdf_helper/__init__.py -> pybuild/lib.linux-x86_64-2.7/sdf_helper
copying sdf_helper/read_nameval.py -> pybuild/lib.linux-x86_64-2.7/sdf_helper
running build_ext
building 'sdf' extension
creating pybuild/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DSDF_DEBUG_ALL -D_XOPEN_SOURCE=600 -I../C/include -L../C/lib -O3 -g -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I../C/src -I/usr/include/python2.7 -c sdf_python.c -o pybuild/temp.linux-x86_64-2.7/sdf_python.o
sdf_python.c:38:10: fatal error: Python.h: No such file or directory
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:417: recipe for target 'sdfutils' failed
make: *** [sdfutils] Error 1
plasma@phy:~/epoch-4.17.10/epoch2d$ 

Hors ligne

#57 Le 15/02/2020, à 12:33

bouchra24

Re : installer les packages de python3

bonjour melixgaro,
j'ai rencontré un problème de compatibilité avec python3.6, le voila

plasma@phy:~$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sdf_helper
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sdf_helper'
>>> 
plasma@phy:~$ python
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sdf_helper
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib.pyplot
>>> 

Hors ligne