networkx / networkx-metis

NetworkX Addon to allow graph partitioning with METIS
Other
79 stars 21 forks source link

Installation issue with Windows 10 #59

Open SubhasreeSengupta opened 7 years ago

SubhasreeSengupta commented 7 years ago

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

OrkoHunter commented 7 years ago

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

SubhasreeSengupta commented 7 years ago

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.

OrkoHunter commented 7 years ago

@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.

shlur commented 6 years ago

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

SubhasreeSengupta commented 6 years ago

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

barrel-0314 commented 3 years ago

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

lystoprez commented 2 years ago

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

aola0 commented 1 year ago

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.