I'm trying to install igakit python extension as part of installing all required dependencies for sfepy package as mentioned in their installation guide page http://sfepy.org/doc-devel/installation.html#requirements .
Sadly, there's no wheel file for it to run using pip.
My installation process was (and still) full of errors to appear and they were 2-phase long, but I will describe only the current phase.
Phase #2: Installed software:-
1-Python 2.7.13 (64-bit)
2-Microsoft Visual C++ for Python 2.7
3-Microsoft Visual C++ 2010 x64 Redistributable
4-Microsoft Visual C++ 2010 x86 Redistributable
5-MinGW-w64 & Msys2 installed as described in this site https://computingabdn.com/softech/mingw-howto-install-gcc-for-windows/ .
When I hit
python setup.py install --user
on to the downloaded top level directory of igakit in command prompt this error comes up
igalibmodule.obj : warning LNK4197: export 'initigalib' specified multiple times; using first specification
Creating library build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\igakit\igalib.lib and object build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\igakit\igalib.exp
igalib.o : error LNK2019: unresolved external symbol _gfortran_internal_pack referenced in function __bspline_MOD_removeknot
igalib.o : error LNK2019: unresolved external symbol _gfortran_matmul_r8 referenced in function __bspeval_MOD_interpolate
igalib.o : error LNK2019: unresolved external symbol _gfortran_stop_string referenced in function __bsp_MOD_hessian3
build\lib.win-amd64-2.7\igakit\igalib.pyd : fatal error LNK1120: 3 unresolved externals
I've also googled this problem before and found that this problem could be caused from a declared but not defined external variable or function, but sadly as I just have little programming experience, and as googling results are mainly devoted to visual studio (which isn't installed in my computer) I can't push further to grab the source of this issue.
Any help ?
According to the answers here from what the repository owner sincerely gave to me, to resolve the problem you need to:-
At the top level directory open the file setup.cfg
then add the following
[build]
#debug = 0
compiler = mingw32
[build_ext]
libraries = gfortran # or maybe libgfortran?
2- save the file then try again hitting python setup.py install --user
.
Notes before implementing the solution:-
1- If you wish to install it in the Python system location, hit python setup.py install
without the --user
flag.
2-If you didn't solve the ((Unable to find vcvarsall.bat)) yet, go and search using the search engine within you 'windows explorer' window the C:\
partition for the file vcvarsall.bat
, then get its location.
Then, open the file msvc9compiler.py
(search for it in C:\Python27
), look for the function query_vcvarsall
, and within it look for the variable vcvarsall
, then assign the full path of vcvarsall.bat
to it.