fraunhoferhhi/PLAS

lap dependency does not install correctly on Linux

Opened this issue · 5 comments

I am trying to setup Self-Orgaizing-Gaussian, and I got a error when install submodule PLAS. I have googled the error but I got nothing.
Could you help me figure out why?

The error massage goes like this:
...
...
In file included from /home/cap/micromamba/envs/sogs/include/python3.10/Python.h:74,
from lap/_lapjv.cpp:4:
lap/_lapjv.cpp: In function ‘PyObject* __pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr*)’:
lap/_lapjv.cpp:5068:41: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
5068 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
| ^~~~~~~~
/home/cap/micromamba/envs/sogs/include/python3.10/object.h:112:41: note: in definition of macro ‘_PyObject_CAST’
112 | #define _PyObject_CAST(op) ((PyObject*)(op))
| ^~
lap/_lapjv.cpp:1146:27: note: in expansion of macro ‘Py_INCREF’
1146 | #define __Pyx_INCREF(r) Py_INCREF(r)
| ^~~~~~~~~
lap/_lapjv.cpp:5068:5: note: in expansion of macro ‘__Pyx_INCREF’
5068 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
| ^~~~~~~~~~~~
lap/_lapjv.cpp:5069:38: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
5069 | __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
| ^~~~~~~~
lap/_lapjv.cpp: In function ‘char* __pyx_f_5numpy__util_dtypestring(PyArray_Descr*, char*, char*, int*)’:
lap/_lapjv.cpp:5164:31: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘names’
5164 | if (unlikely(__pyx_v_descr->names == Py_None)) {
| ^~~~~
lap/_lapjv.cpp:767:43: note: in definition of macro ‘unlikely’
767 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lap/_lapjv.cpp:5168:30: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘names’
5168 | __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
| ^~~~~
lap/_lapjv.cpp:5187:33: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘fields’
5187 | if (unlikely(__pyx_v_descr->fields == Py_None)) {
| ^~~~~~
lap/_lapjv.cpp:767:43: note: in definition of macro ‘unlikely’
767 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
lap/_lapjv.cpp:5191:53: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘fields’
5191 | __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 806, __pyx_L1_error)
| ^~~~~~
lap/_lapjv.cpp:5392:81: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
5392 | (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
| ^~~~~~
In file included from /home/cap/micromamba/envs/sogs/include/python3.10/unicodeobject.h:1046,
from /home/cap/micromamba/envs/sogs/include/python3.10/Python.h:83,
from lap/_lapjv.cpp:4:
lap/_lapjv.cpp: In function ‘int __Pyx_ParseOptionalKeywords(PyObject*, PyObject***, PyObject*, PyObject**, Py_ssize_t, const char*)’:
/home/cap/micromamba/envs/sogs/include/python3.10/cpython/unicodeobject.h:451:61: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declarations]
....
....
error: Command "g++ -pthread -B /home/cap/micromamba/envs/sogs/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/cap/micromamba/envs/sogs/include -fPIC -O2 -isystem /home/cap/micromamba/envs/sogs/include -fPIC -I/home/cap/micromamba/envs/sogs/lib/python3.10/site-packages/numpy/_core/include -Ilap -I/home/cap/micromamba/envs/sogs/lib/python3.10/site-packages/numpy/_core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/cap/micromamba/envs/sogs/include/python3.10 -c lap/_lapjv.cpp -o build/temp.linux-x86_64-cpython-310/lap/_lapjv.o -MMD -MF build/temp.linux-x86_64-cpython-310/lap/_lapjv.o.d -msse -msse2 -msse3" failed with exit status 1
INFO:
########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: x64
Compiler : gcc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : SSE SSE2 SSE3
    Flags       : -msse -msse2 -msse3
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
    Generated   : none
  INFO: CCompilerOpt.cache_flush[864] : write cache to path -> /tmp/pip-install-fbyoq_ra/lap_3d1ab2a8493e44b5a97065660169e633/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lap
Running setup.py clean for lap
Successfully built plas
Failed to build lap
ERROR: Could not build wheels for lap, which is required to install pyproject.toml-based projects

w-m commented

I can have a look at the problem next week. As an interim quick fix, do the following:

  • check out the code locally
  • edit setup.py and remove the line with "lap" (which is only used for FLAS comparison, not for PLAS)
  • pip install -e local/dir/to/PLAS

As the error you show is with installing lap, the install should then hopefully go through.

I can have a look at the problem next week. As an interim quick fix, do the following:

* check out the code locally

* edit setup.py and remove the line with "lap" (which is only used for FLAS comparison, not for PLAS)

* pip install -e local/dir/to/PLAS

As the error you show is with installing lap, the install should then hopefully go through.

Problem solved! Thanks for your help!

Good evening everyone, I'm new to github and the world of programming, in reality I've been focusing on python programming since December 2023, I would like to know if anyone could help me with a python pip installation error, I'm looking for how to fix it But I can't find it, which is slowing me down in the process of various programs, I hope you can help me!
Captura de tela 2024-07-10 202600

w-m commented

@Sevenyt777 this is the issue tracker of the PLAS project. It is not the right place to get support for installing a Python environment.

(You are getting a permissions error, as your Python was installed for all users, in the Program Files folder. And you're trying to install pip there, with a Terminal that does not have the right permissions. I suggest you follow a tutorial on how to install Python (+Pip) for the current user only, with the correct permissions.)

OK!! Got it, thanks for the help, I'll look for a new tutorial