openpose icon indicating copy to clipboard operation
openpose copied to clipboard

Errors in building pyopenpose for python API in Visual Studio (Windows 11)

Open JonOuyang opened this issue 2 years ago • 3 comments

Issue Summary

I was able to successfully get Openpose to run with my webcam, I could build the solution in Visual Studio without any problems, so I moved on to the Python API section. I enabled build_python in cmake-gui and then when I tried to build pyopenpose I got over 40 errors, something to do with the type '_frame'.

I saw someone else with a similar problem who was able to fix it by updating their pybind11 to the latest version, but my pybind11 and python are all already on the latest version, and pyopenpose still refuses to build.

Errors (if any)

image

Type of Issue

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

  • Compilation/installation error
  • Execution error
  • Help wanted
  • Question

Your System Configuration

  1. Whole console output (if errors appeared), paste the error to PasteBin and then paste the link here: LINK

  2. OpenPose version: Latest

  3. General configuration:

    • Installation mode: CMake, sh script, manual Makefile installation, ... (Ubuntu); CMake, ... (Windows); ...?
    • Operating system (lsb_release -a in Ubuntu): Windows
    • Operating system version (e.g., Ubuntu 16, Windows 10, ...): Windows 11
    • Release or Debug mode? Release (errors in both though)
    • Compiler (gcc --version in Ubuntu or VS version in Windows): VS2022 Community
  4. Non-default settings:

    • 3-D Reconstruction module added? (by default: no):
    • Any other custom CMake configuration with respect to the default version? (by default: no):
  5. 3rd-party software:

    • Caffe version: Default from OpenPose
    • CMake version cmake version 3.27.0-rc2
    • OpenCV version: 4.7.0
  6. If Python API:

    • Python version: Python 3.11.4 (latest)
    • Numpy version (python -c "import numpy; print numpy.version.version" in Ubuntu): Numpy 1.23.5
  7. If Windows system:

    • Portable demo or compiled library? Compiled Lib

JonOuyang avatar Jun 19 '23 03:06 JonOuyang

fixed the errors by using the older versions explicitly mentioned in the instructions (VS2019 instead of VS2022, Cuda 11.1, etc) and fixed the remaining 3 errors in numpy.h by referring to https://github.com/davisking/dlib/issues/2463

JonOuyang avatar Jun 27 '23 03:06 JonOuyang

Fixed the _frame error by downgrading to Python 3.10 instead of 3.11

jpatag avatar Oct 01 '23 05:10 jpatag

https://github.com/wufake70/myCmake/blob/master/005-%E6%9E%84%E5%BB%BApyopenpose.md maybe i can help you (window) 也许我能帮助你(window)

wufake70 avatar Oct 04 '23 09:10 wufake70