openPupil / PyPupilEXT

PyPupilEXT allows to detect the pupil diameter in images captured by stereo- and mono camera systems. The pupil diameter can be detected using one of the state-of-the-art open-source algorithms, Starburst, Swirski2D, ExCuSe, ElSe, PuRe and PuReST.
Other
33 stars 6 forks source link

Installation in README doesn't work for me #8

Closed ddogfoodd closed 1 month ago

ddogfoodd commented 1 year ago

Following the installation instructions in the README doesn't work for me. There might be some prerequisites worth mentioning.

I am using macOS (13.5.2).

When following the B) section, running the setup.py to create a wheel I receive the following error at around 87%:

/PyPupilEXT/3rdparty/spii/thirdparty/Eigen/Eigen/Core:138:10: fatal error: 'omp.h' file not found
#include <omp.h>

This is probably because I installed libomp via homebrew. I can get rid of it by replacing #include <omp.h> with #include "/usr/local/opt/libomp/include/omp.h". However this leads to another error at 100%:

ld: warning: directory not found for option '-L/usr/local/Cellar/libomp/14.0.6/lib'
ld: library not found for -llibomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I thought this was most likely related to the now used version of libomp which is 16.0.6 in my case. I replaced all occurrences of libomp/14.0.6 with libomp/16.0.6 so that all libomp/xx.x.x/include and libomp/xx.x.x/lib point to my current version.

However I still receive a similar error at 100%, only the ld: warning: directory not found line is gone:

ld: library not found for -llibomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I couldn't figure out how to continue from there so I tried using the C) section of the installation instructions instead.

Although I followed the instructions and put my numpy path in the CMakeLists.txt and verified the file exists, when running cmake --build . --config Release I get an error message saying numpy is not found:

/PyPupilEXT/src/type_converter.cpp:8:10: fatal error: 'numpy/ndarrayobject.h' file not found
#include <numpy/ndarrayobject.h>

I was hoping someone ran into similar problems and wants to share their solution. Other than that it would be great to have a prebuild docker or pip wheel.

antunsz commented 1 year ago

Using Google Colab I was able to advance a little into instalation ensuring that this packages were installed into the instance

!apt install --upgrade ninja-build autoconf automake libtool make gcc g++ bison gperf libepoxy-dev libgtk-3-dev ffmpeg libavcodec-dev libavformat-dev libavutil-dev yasm nasm

But I'm getting this error now:

CMake Error at CMakeLists.txt:316 (add_dependencies):
  The dependency target "Build_TBB" of target "_pypupil" does not exist.
BZandi commented 1 month ago

The project has been updated, and the build process should now work smoothly on Windows, Ubuntu, and macOS. The instructions in the README file were revised accordingly.

Further, there are now prebuilt wheel files, so you no longer need to build the project from source if your primary goal is to use it. Here's a link to the wheel files for different platforms: https://github.com/openPupil/PyPupilEXT/releases/tag/v0.0.1-beta