tudelft3d / ifcgref

MIT License
17 stars 1 forks source link

pip install dependency mathutils fails #4

Closed nataschake closed 2 months ago

nataschake commented 4 months ago

Hi! I now try the tool in another environment and after running

pip install Flask ifcopenshell pyproj pint numpy scipy pandas shapely

got:

  src/mathutils/mathutils.c: In function ‘mathutils_array_hash’:
      src/mathutils/mathutils.c:79:24: error: incompatible type for argument 1 of ‘_Py_HashDouble’
         79 |     y = _Py_HashDouble(NULL, (double)(array[i++]));
            |                        ^~~~
            |                        |
            |                        void *
      In file included from /home/nata/anaconda3/include/python3.9/Python.h:87,
                       from src/mathutils/mathutils.c:7:
      /home/nata/anaconda3/include/python3.9/pyhash.h:10:38: note: expected ‘double’ but argument is of type ‘void *’
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double);
            |                                      ^~~~~~
      src/mathutils/mathutils.c:79:9: error: too many arguments to function ‘_Py_HashDouble’
         79 |     y = _Py_HashDouble(NULL, (double)(array[i++]));
            |         ^~~~~~~~~~~~~~
      In file included from /home/nata/anaconda3/include/python3.9/Python.h:87,
                       from src/mathutils/mathutils.c:7:
      /home/nata/anaconda3/include/python3.9/pyhash.h:10:23: note: declared here
         10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double);
            |                       ^~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mathutils

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Python 3.9.13 OS UBUNTU Jammy 22.04

amiroo4 commented 3 months ago

The error message shows there's a problem with the mathutils package during installation, specifically due to a function call mismatch in its C code. This issue isn't related to pip but rather with the mathutils package's compatibility with your system.

If you only want to use the tool, consider accessing it through the website instead of installing it: https://ifcgref.bk.tudelft.nl/