Open azzeddinetiba opened 2 years ago
On Windows 10, I had to install using python setup.py install
after modifying line 120 into cmake_args += ["-G", "Visual Studio 16 2019"]
and I get the following error msg :
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19043.
CMake Warning at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/SalomeSetupPlatform.cmake:130 (MESSAGE):
Compiler C:/Program Files (x86)/Microsoft Visual
Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe has
no C++11 support.
Call Stack (most recent call first):
CMakeLists.txt:49 (INCLUDE)
CMake Error at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/FindSalomePythonLibs.cmake:66 (SALOME_EXTRACT_VERSION):
SALOME_EXTRACT_VERSION Macro invoked with incorrect arguments for macro
named: SALOME_EXTRACT_VERSION
Call Stack (most recent call first):
CMakeLists.txt:171 (FIND_PACKAGE)
CMake Error at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/FindSalomePythonLibs.cmake:71 (MESSAGE):
Python libs and interpreter versions are NOT matching: vs 3.8.3
Call Stack (most recent call first):
CMakeLists.txt:171 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
Using Python 3.8.3, cmake 3.22.0 and swig 4.0.2.
Thank you
On Windows 10, I had to install using
python setup.py install
after modifying line 120 intocmake_args += ["-G", "Visual Studio 16 2019"]
and I get the following error msg :CMake that the project does not need compatibility with older versions. -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19043. CMake Warning at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/SalomeSetupPlatform.cmake:130 (MESSAGE): Compiler C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe has no C++11 support. Call Stack (most recent call first): CMakeLists.txt:49 (INCLUDE) CMake Error at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/FindSalomePythonLibs.cmake:66 (SALOME_EXTRACT_VERSION): SALOME_EXTRACT_VERSION Macro invoked with incorrect arguments for macro named: SALOME_EXTRACT_VERSION Call Stack (most recent call first): CMakeLists.txt:171 (FIND_PACKAGE) CMake Error at C:/Users/azzed/Documents/Mechanical engineering/PhD_Year/medcoupling-master/medcoupling-master/configuration-9.4.0/cmake/FindSalomePythonLibs.cmake:71 (MESSAGE): Python libs and interpreter versions are NOT matching: vs 3.8.3 Call Stack (most recent call first): CMakeLists.txt:171 (FIND_PACKAGE) -- Configuring incomplete, errors occurred!
Using Python 3.8.3, cmake 3.22.0 and swig 4.0.2.
Thank you
after setting an environment variable 'PYTHON_ROOT_DIR' to the python path, building wheels pursued a little bit before issuing another error :
Waiting for swig wrappings !!!
XXXXXXXXX/medcoupling-master/medcoupling-master/medCoupling-9.4.0/build/src/MEDCoupling_Swig/CMakeFiles/_MEDCouplingCompat.dir/MEDCouplingPYTHON_wrap.
cxx was unexpected at this time.
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: "cmd.exe" exited with c
ode 255. [C:\XXXXXXXXX\medcoupling-master\medcoupling-master\medCoupling-9.4.0\build\src\MEDCoupling_Swig\_MEDCouplingCom
pat_ready.vcxproj]
interpkernel.vcxproj -> C:\XXXXXXXXX\medcoupling-master\medcoupling-master\medCoupling-9.4.0\build\src\INTERP_KERNEL\
Release\interpkernel.dll
medcouplingcpp.vcxproj -> C:\XXXXXXXXX\medcoupling-master\medcoupling-master\medCoupling-9.4.0\build\src\MEDCoupling\
Release\medcoupling.dll
medcouplingremapper.vcxproj -> C:\XXXXXXXXX\medcoupling-master\medcoupling-master\medCoupling-9.4.0\build\src\MEDCoup
ling\Release\medcouplingremapper.dll
_MEDCouplingRemapper.vcxproj -> C:\XXXXXXXXX\medcoupling-master\medcoupling-master\medCoupling-9.4.0\build\src\MEDCou
pling_Swig\Release\_MEDCouplingRemapper.pyd
Waiting for swig wrappings !!!
XXXXXXXXX/medcoupling-master/medcoupling-master/medCoupling-9.4.0/build/src/PyWrapping/CMakeFiles/_medcoupling.dir/medcouplingPYTHON_wrap.cxx was unex
pected at this time.
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: "cmd.exe" exited with c
ode 255.
@azzeddinetiba I'll have a look if I have some time.
I think we will first upgrade to the latest version of medCoupling 9.7: https://salome-platform.org/downloads/current-version
I'm able to build now for medCoupling 9.7, under Windows 10 / Miniconda. A binary wheel has been uploaded medcoupling-9.7.0.post1-cp37-cp37m-win_amd64.whl
, if you are using Python 3.7 you can directly use it pip install -U medcoupling
.
If you want to build from source (for instance you are using Python 3.8, 3.9)
cmake
, swig
using conda
set PYTHON_ROOT_DIR=[dir to conda]
pip install .
in the root directoryWorks perfectly in Linux and Windows. Thank you
[ For potential future users, I had to change the maximum path length limitation in my Windows for the building to work ( https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd ) ]
It still returns the same error in Mac tho (Python 3.9.7)
Works perfectly in Linux and Windows. Thank you
Great!!
For Mac a patch maybe necessary...I'll have a look.
Hello Tianyi,
I had trouble installing medcoupling on both mac and Windows 10. It seems to me having a trouble finding the right python directories.
On Mac, using Python 3.9.7, cmake 3.22.0, and swig 4.0.2 I have the following error msg after
pip install -U medcoupling
: