openpose
openpose copied to clipboard
Python API
Hi, I am trying to run some python examples, but I am unable to do so. I checked Build python while doing the Cmake-configuration and I can also see the following folder, but whenever I try to run I get the following error stating "cannot import pyopenpose"
Executed Command (if any)
Note: add --logging_level 0 --disable_multi_thread
to get higher debug information.
python2 01_body_from_image.py --logging_level 0 --disable_multi_thread
OpenPose Output (if any)
Errors (if any)
Error: OpenPose library could not be found. Did you enable BUILD_PYTHON
in CMake and have this Python script in the right folder?
cannot import name pyopenpose
Type of Issue
Select the topic(s) on your post, delete the rest:
- Help wanted
- Question
Your System Configuration
-
Whole console output (if errors appeared), paste the error to PasteBin and then paste the link here: LINK
-
OpenPose version: Latest GitHub code? Or specific commit (e.g., d52878f)? Or specific version from
Release
section (e.g., 1.2.0)? 1.7.0 -
General configuration:
- Installation mode: CMake, sh script, manual Makefile installation, ... (Ubuntu); CMake, ... (Windows); ...?
-
Operating system (
lsb_release -a
in Ubuntu): Ubuntu - Operating system version (e.g., Ubuntu 16, Windows 10, ...): Ubuntu 18
- Release or Debug mode? (by default: release):
- Compiler (
gcc --version
in Ubuntu or VS version in Windows): 5.4.0, ... (Ubuntu); VS2015 Enterprise Update 3, VS2017 community, ... (Windows); ...?
-
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):
-
3rd-party software:
- Caffe version: Default from OpenPose, custom version, ...?
-
CMake version (
cmake --version
in Ubuntu): -
OpenCV version: pre-compiled
apt-get install libopencv-dev
(only Ubuntu); OpenPose default (only Windows); compiled from source? If so, 2.4.9, 2.4.12, 3.1, 3.2?; ...?
-
If GPU mode issue:
-
CUDA version (
cat /usr/local/cuda/version.txt
in most cases): - cuDNN version:
-
GPU model (
nvidia-smi
in Ubuntu):
-
CUDA version (
-
If CPU-only mode issue:
- CPU brand & model:
- Total RAM memory available:
-
If Python API:
- Python version: 2.7, 3.7, ...?
-
Numpy version (
python -c "import numpy; print numpy.version.version"
in Ubuntu):
-
If Windows system:
- Portable demo or compiled library?
-
If speed performance issue:
- Report OpenPose timing speed based on the profiling documentation.
The following python folder is present in the build folder, but the error is still appearing:
During Building process following warning appears again and again:
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’: /content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp:21:8: warning: enumeration value ‘CUDNN_STATUS_VERSION_MISMATCH’ not handled in switch [-Wswitch] switch (status) {
It seems to be the same Problem than in issue 2157 ([https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/2157]) - a version missmatch between Cuda and cuDNN.
I am running it on Google Colab and since the warning appears the python skripts do not work anymore.
I am facing the same issue. Any solution yet?
You need to check advanced settings while building via the cmake gui, it has to do with python3 vs python2 difference.
I made it work by running !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2
afterwards, in order to use compatible CUDA and cuDNN versions. Not sure how this worked but I'm okay with dark magic sometimes.