0

I'm trying to install the Clinamen package from pypi using pip install clinamen and I get the following errors :

clinamen\descriptors\finger_descriptors_c.c(30): error C2065: 'M_PI'ÿ: identificateur non d‚clar‚
clinamen\descriptors\finger_descriptors_c.c(72): error C2065: 'M_PI'ÿ: identificateur non d‚clar‚
clinamen\descriptors\finger_descriptors_c.c(80): error C2065: 'M_PI'ÿ: identificateur non d‚clar‚

In the mentionned file, indeed, there is this M_PI variable in lines 30, 72 and 80.

double norm = 4*M_PI*na*na*bin_size/volume;

My environmet is the following :

python 3.9 IDE : VSCode 1.65.2 Windows 11 pip 22.0.4

Anyone has an idea on how to solve this ?

Boidot
  • 363
  • 1
  • 6
  • 18
  • Try `pip install -U clinamen`. – Gerhard Mar 29 '22 at 10:10
  • Else edit finger_descriptors_c.c to add `#define _USE_MATH_DEFINES` to make `M_PI` visible. – Gerhard Mar 29 '22 at 10:11
  • Lastly what versions of Microsoft Visual C++ compilers are visible to pip. – Gerhard Mar 29 '22 at 10:14
  • Thank you @Gerhard. As finger_descriptors_c.c is a file from the package I don't know how to modify it. I just saw the M_PI in the source file from gitlab Also, how to check wht is the Microsoft visual C++ compiler is visible to pip. I recently installed the desktop developments for C++ from MS build tools – Boidot Mar 29 '22 at 13:59
  • I use MinGW. [Try this](https://stackoverflow.com/questions/3297254/how-to-use-mingws-gcc-compiler-when-installing-python-package-using-pip) if you want to try . I do not know how to help you with Microsoft visual C++ compiler. – Gerhard Mar 29 '22 at 14:34
  • I downloaded and modified the finger_descriptors_c.c file, with #define _USE_MATH_DEFINES but it didn't work. I also tried installing and updating MinGW, but the Clinamen installation didn't work either. – Boidot Mar 29 '22 at 15:38

1 Answers1

0

Finally got the installation of clinamen working, after talkking to one of the developers. I installed it through WSL (windows subsystem for linux).

Had to

  • install wsl (from windows store on windows 11)
  • install ubuntu distribution (again windows store)
  • install Remote extension for VSCode
  • Finally installed Clinamen in the bash terminal with a simple pip install clinamen
Boidot
  • 363
  • 1
  • 6
  • 18