networkx-metis icon indicating copy to clipboard operation
networkx-metis copied to clipboard

Installation issue with Windows 10

Open SubhasreeSengupta opened this issue 7 years ago • 8 comments

I am trying to follow the setup steps for windows I have windows 10. However, I am getting an error python setup.py build --compiler=msvc

The error I am getting is: C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition c:\users\desktop\networkx-metis\src\gklib\gk_arch.h(68): note: see previous definition of 'INFINITY' C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(520): error C2059: syntax error: '(' error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

I have tried a lot to solve this issue but am not able to get a fix.

Any suggestions would really help. Thanks

SubhasreeSengupta avatar Jun 01 '17 07:06 SubhasreeSengupta

It says Syntax Error in some internal file. Are you sure your msvc installation is complete?

OrkoHunter avatar Jun 01 '17 08:06 OrkoHunter

Thank you, yes I do have msvc completely installed. I thought that the error was some conflict arising from Metis declarations when using visual studio 2015. I tried to change the gk_arch file in metis where the conflicts seem to arise, but that leads to more errors.

SubhasreeSengupta avatar Jun 01 '17 23:06 SubhasreeSengupta

@SubhasreeSengupta The compiler is a requirement of Cython. Can you have a look at the Cython docs for windows? Maybe that will help you sort out the issue.

OrkoHunter avatar Jun 02 '17 18:06 OrkoHunter

@SubhasreeSengupta have you found the solution? I have the same problem..

shlur avatar Nov 01 '17 19:11 shlur

Unfortunately not, I was not able to set it up with windows.

SubhasreeSengupta avatar Nov 03 '17 00:11 SubhasreeSengupta

@SubhasreeSengupta @shlur It has been 3 years and I have the same problem with Win10, So have you found out theway to solvethis problem?

barrel-0314 avatar Oct 19 '20 12:10 barrel-0314

@SubhasreeSengupta @shlur @barrel-0314 I also have the same problem with Win10. So have you found any way to solve this problem?

lystoprez avatar Jun 28 '22 15:06 lystoprez

I think I have solved the problem and installed it successfully. However, I cannot guarantee that these operations will not cause other problems, such as calculation accuracy.

  1. networkx-metis\src\GKlib\gk_arch.h [line 63] annotate the code #define rint(x) ((int)((x)+0.5)).
  2. networkx-metis\src\GKlib\ms_stdint.h replace all int8_t to ms_int8_t, int_least8_t to ms_int_least8_t, int_fast8_t to ms_int_fast8_t, int_fast16_t to ms_int_fast16_t, uint_fast16_t to ms_uint_fast16_t. (Actually, these variable names can be changed to anything else you want, just make sure they are replaced globally in this file)
  3. Then follow the steps to build and install.

aola0 avatar Jan 06 '23 14:01 aola0