openpose icon indicating copy to clipboard operation
openpose copied to clipboard

Unable to install openpose. fatal error: 'cblas.h' file not found #include <cblas.h> . arm64 (m1 mac)

Open awadbs opened this issue 2 years ago • 4 comments

Issue Summary

I am unable to install openpose. I keep getting an error that cblas.h was not found. The output is below.

I followed all steps to prereqs and upto compilation, here, and I get stopped at the final step. There's an error saying cblas.h is not found. I also tried building caffe seperately as instructed here below but no luck. Still get the cblas.h error again. I have an arm64 cpu (Apple M1 Pro), running on macOS Monterey 12.2.1. I am using python 3.9.10 with pyenv.

I feel like i've exhausted all my options, is there anything else I should try?

Executed Command (if any)

cd build/
make -j`sysctl -n hw.logicalcpu`

Errors (if any)

.../openpose/build/caffe/include/caffe/util/mkl_alternate.hpp:14:10: fatal error: 'cblas.h' file not found
#include <cblas.h>
         ^~~~~~~~~

Type of Issue

Select the topic(s) on your post, delete the rest:

  • Compilation/installation error

Your System Configuration

  1. Console output PasteBin

  2. OpenPose version: Latest GitHub code

  3. General configuration:

    • Installation mode: CMake
    • macOS Monterey
    • OS Version: 12.2.1
    • compiler cmake
  4. Non-default settings:

    • GPU_MODE=CPU_ONLY and BUILD_PYTHON=TRUE and PYTHON_EXECUTABLE=/Users/name/.pyenv/shims/python) (my python exec path since I installed python via pyenv, and not homebrew, as suggested here )
  5. 3rd-party software:

    • Caffe version: Default from OpenPose
    • CMake version : cmake version 3.24.0
    • OpenCV version: (4.6.0)[https://docs.opencv.org/4.x/d0/db2/tutorial_macos_install.html]
  6. If Python API:

    • Python version: 2.7, 3.7, ...? 3.9.10 (pyenv install)
    • Numpy version : 1.23.2

awadbs avatar Aug 20 '22 22:08 awadbs

Getting the same error!! Stuck on it since a long time, any resolutions?

mariahbanu avatar Aug 22 '22 13:08 mariahbanu

Getting the same error!! Stuck on it since a long time, any resolutions?

What OS, CPU, and GPU do you use, and is your python installed via pyenv?

awadbs avatar Aug 22 '22 17:08 awadbs

You can check issue #1942

yuchenrao avatar Sep 06 '22 13:09 yuchenrao

Solved by modifying the CMakeLists.txt file as introduced in #1942 In case you face more errors you can refer to the changes I did for building OpenPose with Caffe uploaded to this repository. All changes are grouped in the commit e0e5833. The steps I followed for a successful installation in my Mac M1 are displayed in the Readme. I hope M1 Mac users can find this helpful.

franzcrs avatar Jun 04 '24 07:06 franzcrs