Bonjour,
j'ai besoin d'installer slepc4py, (je dois installer aussi SLEPc) pour faire simple j'ai utilisé la commande "pip installe slepc slepc4py" sans succès:
root@user-UX331UN:/home/user/slepc-3.8.2# pip install slepc slepc4py
Requirement already satisfied: slepc in /usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg
Collecting slepc4py
Using cached slepc4py-3.8.0.tar.gz
Requirement already satisfied: petsc<3.9,>=3.8 in /usr/local/lib/python2.7/dist-packages (from slepc)
Requirement already satisfied: petsc4py<3.9,>=3.8 in /usr/local/lib/python2.7/dist-packages (from slepc4py)
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (from petsc4py<3.9,>=3.8->slepc4py)
Building wheels for collected packages: slepc4py
Running setup.py bdist_wheel for slepc4py ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dLsWId/slepc4py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpNqtBxppip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_src
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/slepc4py
copying src/__main__.py -> build/lib.linux-x86_64-2.7/slepc4py
copying src/SLEPc.py -> build/lib.linux-x86_64-2.7/slepc4py
copying src/__init__.py -> build/lib.linux-x86_64-2.7/slepc4py
creating build/lib.linux-x86_64-2.7/slepc4py/lib
copying src/lib/__init__.py -> build/lib.linux-x86_64-2.7/slepc4py/lib
creating build/lib.linux-x86_64-2.7/slepc4py/include
creating build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc_api.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.i -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pxd -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/SLEPc.pxd -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pyx -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/SLEPc.pxd -> build/lib.linux-x86_64-2.7/slepc4py
copying src/lib/slepc.cfg -> build/lib.linux-x86_64-2.7/slepc4py/lib
running build_ext
SLEPC_DIR: /usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc
PETSC_DIR: /usr/local/lib/python2.7/dist-packages/petsc
PETSC_ARCH:
version: 3.8.1 release
integer-size: 32-bit
scalar-type: real
precision: double
language: CONLY
compiler: /usr/bin/mpicc
linker: /usr/bin/mpicc
building 'SLEPc' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
/usr/bin/mpicc -pthread -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -g -O -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -DPETSC_DIR=/usr/local/lib/python2.7/dist-packages/petsc -DSLEPC_DIR=/usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc -I/usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc/include -I/usr/local/lib/python2.7/dist-packages/petsc/include -Isrc/include -I/usr/local/lib/python2.7/dist-packages/petsc4py/include -I/usr/include/python2.7 -c src/SLEPc.c -o build/temp.linux-x86_64-2.7/src/SLEPc.o
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c:515:19: fatal error: slepc.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command '/usr/bin/mpicc' failed with exit status 1
----------------------------------------
Failed building wheel for slepc4py
Running setup.py clean for slepc4py
Failed to build slepc4py
Installing collected packages: slepc4py
Running setup.py install for slepc4py ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dLsWId/slepc4py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-YaVIIJ-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_src
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/slepc4py
copying src/__main__.py -> build/lib.linux-x86_64-2.7/slepc4py
copying src/SLEPc.py -> build/lib.linux-x86_64-2.7/slepc4py
copying src/__init__.py -> build/lib.linux-x86_64-2.7/slepc4py
creating build/lib.linux-x86_64-2.7/slepc4py/lib
copying src/lib/__init__.py -> build/lib.linux-x86_64-2.7/slepc4py/lib
creating build/lib.linux-x86_64-2.7/slepc4py/include
creating build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc_api.h -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.i -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pxd -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/SLEPc.pxd -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pyx -> build/lib.linux-x86_64-2.7/slepc4py/include/slepc4py
copying src/SLEPc.pxd -> build/lib.linux-x86_64-2.7/slepc4py
copying src/lib/slepc.cfg -> build/lib.linux-x86_64-2.7/slepc4py/lib
running build_ext
SLEPC_DIR: /usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc
PETSC_DIR: /usr/local/lib/python2.7/dist-packages/petsc
PETSC_ARCH:
version: 3.8.1 release
integer-size: 32-bit
scalar-type: real
precision: double
language: CONLY
compiler: /usr/bin/mpicc
linker: /usr/bin/mpicc
building 'SLEPc' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
/usr/bin/mpicc -pthread -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -g -O -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -DPETSC_DIR=/usr/local/lib/python2.7/dist-packages/petsc -DSLEPC_DIR=/usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc -I/usr/local/lib/python2.7/dist-packages/slepc-3.8.0-py2.7.egg/slepc/include -I/usr/local/lib/python2.7/dist-packages/petsc/include -Isrc/include -I/usr/local/lib/python2.7/dist-packages/petsc4py/include -I/usr/include/python2.7 -c src/SLEPc.c -o build/temp.linux-x86_64-2.7/src/SLEPc.o
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c:515:19: fatal error: slepc.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command '/usr/bin/mpicc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dLsWId/slepc4py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-YaVIIJ-record/install-record.txt --single-ver
J'ai testé "easy_install slepc4py" mais ca ne fonctionne pas non plus:
root@user-UX331UN:/home/user/slepc-3.8.2# easy_install slepc4py
Searching for slepc4py
Reading [pypi.python.org]
Best match: slepc4py 3.8.0
Downloading [pypi.python.org]
Processing slepc4py-3.8.0.tar.gz
Writing /tmp/easy_install-sym1PW/slepc4py-3.8.0/setup.cfg
Running slepc4py-3.8.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-sym1PW/slepc4py-3.8.0/egg-dist-tmp-G7hz0H
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c:515:19: fatal error: slepc.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: Setup script exited with error: command '/usr/bin/mpicc' failed with exit status 1
Je crois qu'il y a des problèmes de dépendance avec PETSc.
Avez vous une idée pour m'aider à avancer svp?
Merci
# Headers
Posté par cfx . Évalué à 1.
A priori, il te manque les headers de slepc.
Il faut que tu installes via le gestionnaire de paquets de ton OS un paquet dont le nom ressemble à
slepc-dev
.[^] # Re: Headers
Posté par indie . Évalué à 1.
J'ai déjà installé slepc-dev…
[^] # Re: Headers
Posté par cfx . Évalué à 1.
Peux tu vérifier que
slepc.h
existe bien quelque-part sur ta machine ?[^] # Re: Headers
Posté par indie . Évalué à 1.
Oui, il est dans /usr/include/slepc
[^] # Re: Headers
Posté par indie . Évalué à 1.
Plus précisement:
```
:~$ locate slepc.h
/home/user/slepc-3.8.2/include/slepc.h
/home/user/slepc-3.8.2/include/slepc.h.html
/home/user/slepc-3.8.2/include/slepc/finclude/slepc.h
/home/user/slepc-3.8.2/include/slepc/finclude/slepc.h.html
/home/user/slepc-3.8.2/include/slepc/private/vecimplslepc.h
/home/user/slepc-3.8.2/include/slepc/private/vecimplslepc.h.html
/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real/include/slepc.h
/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real/include/slepc/finclude/slepc.h
/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real/include/slepc/finclude/slepc.h90
/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real/include/slepc/private/vecimplslepc.h
Suivre le flux des commentaires
Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.