-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install pyk4a using pip3 #28
Comments
Hi, you probably forgot to add the k4a lib to the path. |
Thank you for the answer. Can you please tell me to which path do we need to add this k4alib? I added it to the folder where my build for k4aviewer is. |
pip3 usually refers to pip on recent systems. python 2 is not supported for this library. Please read the readme. You need to specify the path to the pip command. I will close as this is a problem with your management of your windows environment. |
The issue is solved thank you. |
Hi! I am facing a similar issue with pyk4a installation. Here is what I use: C:\Program Files\Azure Kinect SDK v1.4.1\tools> pip install pyk4a
|
For the second command you used, I guess you didn't notice you were including directories of a k4a SDK v1.2.0 while you seem to have v1.4.1 installed. Try this instead: You should make sure this path exists in your system. Otherwise modify it to fit your k4a SDK install. Hopefully this helps solve your problem. Sorry I am not a windows user and do not know any simple alternatives to this. |
Thank you very much! This worked! |
When I run the following command, I get an error: from pyk4a import PyK4A Here is the link to the pyk4a module: https://github.com/etiennedub/pyk4a |
Hi @kramakr4! did you resolve this issue? I have all of the paths in the env of windows, and after the install was successful i also get
Do you have any suggestions? |
@zapaishchykova sorry I never saw this. Did you manage to make it work? |
@lpasselin oh yes, a bit of manipulation with paths and it worked! |
@zapaishchykova What was the trick? I'm getting the same problem, and can't seem to find the right path to add. |
Thanks -- but unfortunately adding that line to my path and restarting my terminal doesn't work for me. Still get the error:
|
@dmorris0 can you show me the contents of your \release\bin? |
Do you specify in python path of the module? import sys
sys.path.insert(1, '../pyKinectAzure/')
import numpy as np
from pyKinectAzure import pyKinectAzure,_k4a, postProcessing
import cv2
import time
import os
paths = []
# Path to the module
modulePath = r'C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\bin'
if __name__ == "__main__":
# Initialize the library with the path containing the module
pyK4A = pyKinectAzure(modulePath)
# Open device
num_connected_devices = pyK4A.device_get_installed_count()
print("[LOG]: Number of connected devices ",num_connected_devices) |
Ah interesting. I am trying to find out where your |
It should be this one |
I see -- that looks like a very nice repo. Perhaps if I get that one working it will solve my module import problem? But I also discovered that Open3D can read directly from the Kinect, and I got that up and running very easily. I might just go with Open3D unless this repo has advantages. Thanks for your help @zapaishchykova |
@dmorris0 , please check this: #117 (comment) |
@shagren that looks exactly like what I need, but I run it and I get the same module error. |
I had the same problem, but I solved applying #117
############################## def _add_dll_directory(path: Path): def kinect(): #---- end of helper_path.py---- ############################# hp.kinect() #Load camera with the default config #Get the next capture (blocking function) #create figure plt.subplot(132) #Display with pyplot #---- end of example.py---- |
This problem is fixed in the dev. |
Thanks @lpasselin !!! my respects and congratulations for the great work!! |
Thank @shagren! |
In windows: adding |
First of all thank you for this repo. I am currently working on Nvidia Xavier and I receive the following error:
The error I receive is :
Collecting pyk4a
Downloading https://files.pythonhosted.org/packages/ab/95/39fc624670d1f2c303e8db27b92a8d391085bcdb654004fcba0a43f41e7a/pyk4a-0.3.tar.gz
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from pyk4a)
Building wheels for collected packages: pyk4a
Running setup.py bdist_wheel for pyk4a ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-2pf4lz14/pyk4a/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmp0xd5qmq2pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/pyk4a.py -> build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/config.py -> build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/init.py -> build/lib.linux-aarch64-3.6/pyk4a
running build_ext
building 'k4a_module' extension
creating build/temp.linux-aarch64-3.6
creating build/temp.linux-aarch64-3.6/pyk4a
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c pyk4a/pyk4a.cpp -o build/temp.linux-aarch64-3.6/pyk4a/pyk4a.o
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1809:0,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from pyk4a/pyk4a.cpp:2:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^~~~~~~
pyk4a/pyk4a.cpp:4:10: fatal error: k4a/k4a.h: No such file or directory
#include <k4a/k4a.h>
^~~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for pyk4a
Running setup.py clean for pyk4a
Failed to build pyk4a
Installing collected packages: pyk4a
Running setup.py install for pyk4a ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-2pf4lz14/pyk4a/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-t0682us4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/pyk4a.py -> build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/config.py -> build/lib.linux-aarch64-3.6/pyk4a
copying pyk4a/init.py -> build/lib.linux-aarch64-3.6/pyk4a
running build_ext
building 'k4a_module' extension
creating build/temp.linux-aarch64-3.6
creating build/temp.linux-aarch64-3.6/pyk4a
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c pyk4a/pyk4a.cpp -o build/temp.linux-aarch64-3.6/pyk4a/pyk4a.o
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1809:0,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from pyk4a/pyk4a.cpp:2:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^~~~~~~
pyk4a/pyk4a.cpp:4:10: fatal error: k4a/k4a.h: No such file or directory
#include <k4a/k4a.h>
^~~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-2pf4lz14/pyk4a/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-t0682us4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2pf4lz14/pyk4a/
The text was updated successfully, but these errors were encountered: