CMU-Perceptual-Computing-Lab / openpose

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
https://cmu-perceptual-computing-lab.github.io/openpose
Other
31.01k stars 7.84k forks source link

python API installation failure #1062

Closed benjaminabruzzo closed 5 years ago

benjaminabruzzo commented 5 years ago

(edited for formatting, 2019-02-06)

Issue Summary

Following install instructions, python libraries not compiled. Neither of these files are getting created: pyopenpose.cpython-35m-x86_64-linux-gnu.so pyopenpose.so

Executed Command (if any)

Both of these commands work

Ubuntu and Mac

'./build/examples/openpose/openpose.bin --video examples/media/video.avi'

With face and hands

'./build/examples/openpose/openpose.bin --video examples/media/video.avi --face --hand'

Type of Issue

Installation issue

Your System Configuration

  1. Whole console output

ImportError: cannot import name pyopenpose

https://pastebin.com/ggGYPHSM

  1. OpenPose version: Latest GitHub code: 2a80c66

  2. General configuration:

    • Operating system (lsb_release -a in Ubuntu): No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial

    • Operating system version Ubuntu 16.04.5 LTS

    • Release or Debug mode? (by default: release):

    • Compiler default native compilers

    • Installation mode:

      
      sudo apt install cmake-qt-gui
      sudo apt-get install -y libgoogle-glog-dev protobuf-compiler install libatlas-base-dev 

mkdir -p ~/CMU/ && cd ~/CMU && git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose cd ~/CMU/openpose && git pull origin master

mkdir -p cd ~/CMU/openpose/build && cd ~/CMU/openpose/build && cmake .. # This takes a while, just be patient cmake-gui

"Where is the source code?" /home/benjamin/CMU/openpose

"Where to build the binaries?" /home/benjamin/CMU/openpose/build

check BUILD_PYTHON

check USE_PYTHON_INCLUDE_DIR

Install Eigen

### Download from here: http://eigen.tuxfamily.org/index.php?title=Main_Page#Download
extract to ~/eigen
pip install pytest --user
pip3 install pytest --user
# check PYBIND11_PYTHON_INSTALL
# check PYTBIND_TEST

make -jnproc

sudo make install



4. **Non-default settings**:
    - **3-D Reconstruction module added**? (by default: no): no
    - Any other custom CMake configuration with respect to the default version? (by default: no): no

5. **3rd-party software**:
    - **Caffe version**: Default from OpenPose, custom version, ...?  default from "camke .. " installation
    - **CMake version** (`cmake --version` in Ubuntu): cmake version 3.5.1
    - **OpenCV version**: /opt/ros/kinetic/share/OpenCV-3.3.1-dev  installaed with ros kinetic

6. If **GPU mode** issue:
    - **CUDA version** (`cat /usr/local/cuda/version.txt` in most cases): CUDA Version 10.0.130
    - **cuDNN version**:
            #define CUDNN_MAJOR 7
            #define CUDNN_MINOR 4
            #define CUDNN_PATCHLEVEL 2

    - **GPU model** (`nvidia-smi` in Ubuntu):
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.79       Driver Version: 410.79       CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro M2000        Off  | 00000000:01:00.0  On |                  N/A |
| 56%   46C    P0    23W /  75W |    295MiB /  4040MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1308      G   /usr/lib/xorg/Xorg                           128MiB |
|    0      1682      G   /usr/bin/gnome-shell                         162MiB |
+-----------------------------------------------------------------------------+

7. If **CPU-only mode** issue:
    - **CPU brand & model**:
    - Total **RAM memory** available:

8. If **Python** API:
    - **Python version**: 2.7, 3.7, ...? 2.7.12 and 3.5.2
    - **Numpy version** (`python -c "import numpy; print numpy.version.version"` in Ubuntu):  1.15.4
soulslicer commented 5 years ago

I cant help you if you dont post your cmake and make logs

Also did you try running the examples in tutorial_api_python?

benjaminabruzzo commented 5 years ago

Yes, it was while trying those tutorials that I discovered the python bit was not present.

These are the only log files I see, is there any in specific that I am missing that I should have in my build dir?

CMakeOutput.log: https://pastebin.com/z1Z9FJUY CMakeError.log: https://pastebin.com/MYfhuTLK

soulslicer commented 5 years ago

This does not look like any log I have seen.

Did you run

cmake .. make

?

benjaminabruzzo commented 5 years ago

I did. Specifically, I ran these commands

cmake .. 
cmake-gui
make -j`nproc`
sudo make install

It built successfully enough to test using the quickstart command:

./build/examples/openpose/openpose.bin --video examples/media/video.avi

I just can't get the python configuration to build as well.

soulslicer commented 5 years ago

Hi, the build log is suppose to look like this actually:

https://travis-ci.org/CMU-Perceptual-Computing-Lab/openpose/jobs/489213901

I'm not sure why yours looks like that

benjaminabruzzo commented 5 years ago

I'm sorry, I was being dense. You just cut and pasted from the terminal.

I did an rm -rf on the openpose installation folder and started over. I'm currently getting this error during make/install:

make -j4 : https://pastebin.com/vS5kDAJi

sudo make install: https://pastebin.com/k9A4DsYV

I'm not sure, but it seems like there is an issue with either CUDA10.0 or with eigen.

soulslicer commented 5 years ago

This issue doesnt have to do with Python Anymore, please close this and make a new issue related to this

I suggest you just do make instead of make -j4 so the error is easier to read.

Also please give the output of cmake ..