{"action":"created","issue":{"url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/768","repository_url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose","labels_url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/768/labels{/name}","comments_url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/768/comments","events_url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/768/events","html_url":"https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/768","id":347114691,"node_id":"MDU6SXNzdWUzNDcxMTQ2OTE=","number":768,"title":"Unable to run Python API on windows using default configuration and installation","user":{"login":"flpymonkey","id":8204580,"node_id":"MDQ6VXNlcjgyMDQ1ODA=","avatar_url":"https://avatars3.githubusercontent.com/u/8204580?v=4","gravatar_id":"","url":"https://api.github.com/users/flpymonkey","html_url":"https://github.com/flpymonkey","followers_url":"https://api.github.com/users/flpymonkey/followers","following_url":"https://api.github.com/users/flpymonkey/following{/other_user}","gists_url":"https://api.github.com/users/flpymonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/flpymonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flpymonkey/subscriptions","organizations_url":"https://api.github.com/users/flpymonkey/orgs","repos_url":"https://api.github.com/users/flpymonkey/repos","events_url":"https://api.github.com/users/flpymonkey/events{/privacy}","received_events_url":"https://api.github.com/users/flpymonkey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-02T17:57:21Z","updated_at":"2018-08-06T07:08:09Z","closed_at":null,"author_association":"NONE","body":"### Issue Summary\r\nI have also been having trouble running the python API for windows.\r\n\r\nAfter verifying that the source code compiled and the demo worked, I am now trying to use the Python API. However, by following the instructions ([found here](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/modules/python_module.md)) and trying to run `1_extract_pose.py`, I receive the following error:\r\n\r\n`Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?`\r\nThis error is thrown as a result of a failed import (lines 18-21 in `1_extract_pose.py`). I already have `BUILD_PYTHON` set to ON and have re built the project using Cmake and VS2015.\r\n\r\nI thought that this resulted from something wrong with the path, so I hardcoded the path to the `build/python/openpose/` directory and then got a different error on line 37 when it says it can't find the OpenPose class (despite the import appearing to work).\r\nHowever, when printing `dir(openpose)` after the import to the absolute system path, OpenPose does not appear in the list. \r\n\r\nAdditionally, I tried adding the absolute path to my environment variables, and then using `import openpose` in python3.6 IDLE and received the following error: \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\bencj\\Documents\\Development\\openpose\\build\\python\\openpose\\openpose.py\", line 27, in OpenPose\r\n    _libop= np.ctypeslib.load_library('_openpose', dir_path+'/Release/_openpose.dll')\r\n  File \"C:\\Users\\bencj\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\numpy\\ctypeslib.py\", line 155, in load_library\r\n    raise OSError(\"no file with expected extension\")\r\nOSError: no file with expected extension\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<pyshell#0>\", line 1, in <module>\r\n    import openpose\r\n  File \"C:\\Users\\bencj\\Documents\\Development\\openpose\\build\\python\\openpose\\openpose.py\", line 17, in <module>\r\n    class OpenPose(object):\r\n  File \"C:\\Users\\bencj\\Documents\\Development\\openpose\\build\\python\\openpose\\openpose.py\", line 29, in OpenPose\r\n    _libop= np.ctypeslib.load_library('_openpose', dir_path+'/Debug/_openpose.dll')\r\n  File \"C:\\Users\\bencj\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\numpy\\ctypeslib.py\", line 155, in load_library\r\n    raise OSError(\"no file with expected extension\")\r\nOSError: no file with expected extension\r\n```\r\nWhich once again appears to be an issue with the paths used for load_libraries. Has anyone else had similar issues? Am I potentially doing something wrong when running cmake and compiling through VS2015? I followed the setup instructions exactly and have confirmed that the demo works.\r\n\r\n### Type of Issue\r\n- Compilation/installation error\r\n- Execution error\r\n\r\n\r\n### Your System Configuration\r\n1. Latest GitHub code\r\n\r\n2. **General configuration**:\r\n    - **Installation mode**: CMake Windows, VSCode2015 for build compilation\r\n    - **Operating system**: Windows\r\n    - **Release or Debug mode**: Release\r\n    - Compiler: VS2015 community\r\n\r\n3. **Non-default settings**:\r\n    None\r\n\r\n4. **3rd-party software**:\r\n    - **Caffe version**: Default from OpenPose\\\r\n    - **CMake version**: 3.12.0\r\n    - **OpenCV version**: OpenPose default (only Windows)\r\n\r\n5. If **GPU mode** issue:\r\n    - **CUDA version**: 8\r\n    - **cuDNN version**: Unsure?\r\n    - **GPU model**: Nvidia 960m\r\n\r\n7. If **Python** API:\r\n    - **Python version**: 3.6\r\n    - **Numpy version**: 1.15.0\r\n\r\n8. If **Windows** system:\r\n   compiled library"},"comment":{"url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/comments/410609654","html_url":"https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/768#issuecomment-410609654","issue_url":"https://api.github.com/repos/CMU-Perceptual-Computing-Lab/openpose/issues/768","id":410609654,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDYwOTY1NA==","user":{"login":"whycn","id":32027203,"node_id":"MDQ6VXNlcjMyMDI3MjAz","avatar_url":"https://avatars3.githubusercontent.com/u/32027203?v=4","gravatar_id":"","url":"https://api.github.com/users/whycn","html_url":"https://github.com/whycn","followers_url":"https://api.github.com/users/whycn/followers","following_url":"https://api.github.com/users/whycn/following{/other_user}","gists_url":"https://api.github.com/users/whycn/gists{/gist_id}","starred_url":"https://api.github.com/users/whycn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whycn/subscriptions","organizations_url":"https://api.github.com/users/whycn/orgs","repos_url":"https://api.github.com/users/whycn/repos","events_url":"https://api.github.com/users/whycn/events{/privacy}","received_events_url":"https://api.github.com/users/whycn/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T07:08:09Z","updated_at":"2018-08-06T07:08:09Z","author_association":"NONE","body":"I use win10 and had the same question. I also tried to hardcode the path of openpose lib but still it still can't work."}}
{"actor":{"display_login":"whycn"}}