Category : cmake

If you are about to flag this question as duplicate to cmake source directory does not exist. The answers in that question aren’t helpful in my case i’m trying to build opencv-python from the source. as shown in here https://docs.opencv.org/3.4.15/d7/d9f/tutorial_linux_install.html First, I downloaded the source and then extracted it and then created a build directory ..

Read more

i’ve tried for over a week to compile this api https://github.com/IntelRealSense/RealSenseID (it’s my frist time using Cmake) . On the official documentation it is shown how to compile the api for python (because i must use python for the application requested) , but by following this guide (official documentation) https://github.com/IntelRealSense/RealSenseID/tree/master/samples/python, all i get is this, ..

Read more

I’m using an M1 mac and have been following this documentation to install openCV. when I run this code: cmake –build . -j8 I encountered this error: /Users/Boogie/opencv/modules/python/src2/cv2.cpp:33:10: fatal error: ‘numpy/ndarrayobject.h’ file not found #include <numpy/ndarrayobject.h> ^~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1 make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2 make[1]: *** Waiting for unfinished ..

Read more

I have been trying to build a Python extension and to debug some memory related problems I have built Python from source in develop mode using: git clone https://github.com/python/cpython.git cd cpython ./configure –enable-framework –with-pydebug –without-pymalloc –with-valgrind sudo make frameworkinstall Now I want to link the newly built Python using the standard CMake FindPython.cmake: … find_package(Python ..

Read more

I am trying to build the mraa library (https://github.com/eclipse/mraa) with cmake and bazel and then use it in a python library. BUILD: cmake( name = "libmraa-cmake", visibility = ["//visibility:public"], lib_source = ":files", out_data_dirs = ["lib/"], out_binaries = ["mraa-gpio", "mraa-i2c", "mraa-urt"], ) py_library( name = "libmraa-py", data = [":libmraa-cmake"], visibility = ["//visibility:public"], ) filegroup( name = ..

Read more

I am trying to build the mraa (https://github.com/eclipse/mraa) library with python bindings in bazel and use in a container. I found a hacky workaround that is actually running, but would like to do it properly. The workaround: BUILD: load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit") load("@io_bazel_rules_docker//python3:image.bzl", "py3_image") py3_image( name = "python_service", base = "python_base_image", srcs = ["main.py"], main = "main.py", ..

Read more

I want to run my program inside Jupyter Notebook but I need to install face_recognition first using pip3 install face_recognition. But I keep on receiving this error ERROR: Command errored out with exit status 1: command: /home/opc/py36env/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-5zstrya1/dlib_5f4cec1247f74d1098b0e055d68c7ff3/setup.py’"’"’; file=’"’"’/tmp/pip-install-5zstrya1/dlib_5f4cec1247f74d1098b0e055d68c7ff3/setup.py’"’"’;f = getattr(tokenize, ‘"’"’open’"’"’, open)(file) if os.path.exists(file) ..

Read more

I am trying to have my pybind11 module(MyModule) installed into my BUILD_DIR directory. I tried "install", "set_target_properties" – but neither works and it didnt even throw errors. It always installs the so file in the current directory rather than BUILD_DIR. pybind11_add_module(MyModule MyFile.cpp) install( TARGETS MyModule DESTINATION "${BUILD_DIR}" ) set_target_properties( MyModule PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIR}" ) How ..

Read more