Dear Marcelo,
Yes, Python is detected from the migw64 so that the interface will be
build for this version.
The problem should be that the dynamic library build is not compatible
with Python from Anaconda
(In that case, you should be able to run a python script which call
GetFEM from the Python of migw64)
May be you can try to run the configure script with the option
PYTHON="path_for_anaconda_python..."
Best regards,
Yves
Le 29/06/2021 à 17:56, Marcelo Frydman a écrit :
Yves,
Please see below the end note from the configure script. It is
suggesting Python is detected.
Libraries Used:
---------------
- QD library not found (don't worry, this library is only recommended
for very specific uses).
- Qhull found. Using the Qhull library for delaunay triangulations.
- Mumps found. A direct solver for large sparse linear systems.
- Lapack library found: -llapack
- BLAS library found. Link options: -lblas -lgfortran
You can give the location of your prefered blas library with either
the --with-blas=<lib> option, or the BLAS_LIBS environment variable
for example: ./configure BLAS_LIBS="-L/usr/lib/sse2/atlas/ -lblas"
Use blas with 32 bits integers
-----------------------------------------------------------------------
Ready to build getfem
building MATLAB interface: NO
building OCTAVE interface: NO
building PYTHON interface: YES (requires numpy, scipy and also mpi4py
for the parallel version)
building SCILAB interface: NO
If you want to build the shared library of GetFEM, use --enable-shared
(by default, only the static one will be built)
-----------------------------------------------------------------------
However, if you for the specific python check (see below), the Python
from migw64 is the one used, not from Anaconda.
checking for python... /mingw64/bin/python
checking for python version... 3.8
checking for python platform... win32
checking for python script directory...
${prefix}/lib/python3.8/site-packages
checking for python extension module directory...
${exec_prefix}/lib/python3.8/site-packages
Building with python (/mingw64/bin/python) support (use
--enable-python=no to disable it)
You will need the python-numpy and python-scipy packages.
checking for python3.8... (cached) /mingw64/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -IC:/msys64/mingw64/include/python3.8
checking for Python library path... -LC:/msys64/mingw64/lib/python3.8
-lpython3.8
checking for Python site-packages path...
C:/msys64/mingw64/lib/python3.8/site-packages
checking python extra libraries... -lws2_32 -lm -lversion -lshlwapi
checking python extra linking flags...
Thanks again,
Marcelo
*From:*Yves Renard <yves.ren...@insa-lyon.fr>
*Sent:* martes, 29 de junio de 2021 12:44
*To:* Marcelo Frydman <mfrydm...@outlook.com>
*Cc:* getfem-users@nongnu.org
*Subject:* Re: ModuleNotFoundError: No module named '_getfem'
Dear Marcelo,
If the python installation is correct, it should be detected by the
configure script. When you run the configure script, at the end, it
should be noted that python is detected. Is it the case ?
Best regards,
Yves
Le 29/06/2021 à 15:05, Marcelo Frydman a écrit :
Yves,
Thank you very much for your ready answer. Please see below the
PYTHONPATH and Environment set in Spyder/Anaconda.
There wasn’t any /_getfem.*/ created during the compilation
process. I am not sure I am building the Pyhton interface
properly. There was a step:
/Install Anaconda2 and add to windows path
//C:\install_dir\Anaconda2// and
//C:\install_dir\Anaconda2\Scripts// where //install_dir// is the
installation directory of Anaconda2 (//ProgramData// by default
for a system installation)/
I am not sure what does it mean. Do I need to set these variables
elsewhere in MSYS before building the Pyhton interface? Any
problem with the PYTHONPATH set?
Thanks again,
Marcelo
*From:*Yves Renard <yves.ren...@insa-lyon.fr>
<mailto:yves.ren...@insa-lyon.fr>
*Sent:* martes, 29 de junio de 2021 04:28
*To:* Marcelo Frydman <mfrydm...@outlook.com>
<mailto:mfrydm...@outlook.com>; getfem-users@nongnu.org
<mailto:getfem-users@nongnu.org>
*Subject:* Re: ModuleNotFoundError: No module named '_getfem'
Dear Marcelo,
Did you set the PYTHONPATH variable after building the interface ?
Best regards,
Yves
Le 28/06/2021 à 20:57, Marcelo Frydman a écrit :
Dear GetFem users,
I have just installed Getfem on Windows (Msys). I have
followed the instructions on:
http://getfem.org/install/install_windows.html
<http://getfem.org/install/install_windows.html>
The compilation process was working fine, without major issue.
I ran “make check” before building the Pyhton interface, and
got a positive message:
/Testsuite summary for getfem 5.4.1/
/============================================================================/
*/# TOTAL: 41/*
/# PASS: 41/
/# SKIP: 0/
/# XFAIL: 0/
/# FAIL: 0/
/# XPASS: 0/
/# ERROR: 0/
However, Python interface is not working. I ran “make check”
for the Pyhton examples:
/FAIL//: check_export.py/
/FAIL//: check_global_functions.py/
/FAIL//: check_asm.py/
/FAIL//: check_secondary_domain.py/
/FAIL//: check_mixed_mesh.py/
/FAIL//: demo_wave.py/
/FAIL//: demo_wave_equation.py/
/FAIL//: demo_laplacian.py/
/FAIL//: demo_laplacian_HHO.py/
/FAIL//: demo_elasticity_HHO.py/
/FAIL//: demo_thermo_elasticity_electrical_coupling.py/
/FAIL//: check_levelset.py/
/============================================================================/
/Testsuite summary for getfem 5.4.1/
/============================================================================/
*/# TOTAL: 12/*
/# PASS: 0/
/# SKIP: 0/
/# XFAIL: 0/
/# FAIL: 12/
/# XPASS: 0/
/# ERROR: 0/
/============================================================================/
/See interface/tests/python/test-suite.log/
/============================================================================/
I tried to run one of the examples in Spyder, and got the
following error:
/Python 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64
bit (AMD64)]/
/Type "copyright", "credits" or "license" for more information./
//
/IPython 7.22.0 -- An enhanced Interactive Python./
//
/Traceback (most recent call last):/
//
/ File
"C:\msys64\home\m.frydman\getfem\interface\src\python\getfem.py",
line 45, in <module>/
/ from ._getfem import */
//
/ImportError: attempted relative import with no known parent
package/
//
//
/During handling of the above exception, another exception
occurred:/
//
/Traceback (most recent call last):/
//
/ File
"C:\msys64\home\m.frydman\getfem\interface\src\python\getfem.py",
line 47, in <module>/
/ from _getfem import */
//
/ModuleNotFoundError: No module named '_getfem'/
//
Looking forward to start having fun with GetFem.
Thanks,
Marcelo
--
Yves Renard (yves.ren...@insa-lyon.fr
<mailto:yves.ren...@insa-lyon.fr>) tel : (33) 04.72.43.87.08
INSA-Lyon
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard <http://math.univ-lyon1.fr/~renard>
---------
--
Yves Renard (yves.ren...@insa-lyon.fr <mailto:yves.ren...@insa-lyon.fr>)
tel : (33) 04.72.43.87.08
INSA-Lyon
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard <http://math.univ-lyon1.fr/~renard>
---------
--
Yves Renard (yves.ren...@insa-lyon.fr) tel : (33) 04.72.43.87.08
INSA-Lyon
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------