question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import k4a_module

See original GitHub issue

Hi, I use windows and I pip install pyk4a through my cmd and it is successfully installed, below is the message that I got. Processing c:\users\ayeuser4\appdata\local\pip\cache\wheels\53\5f\d6\2578c50004084994a636f0124ba027261e51614a0ee759aa73\pyk4a-1.3.0-cp38-cp38-win_amd64.whl Requirement already satisfied: python-version>=“3.4” in c:\users\ayeuser4\appdata\local\programs\python\python38\lib\site-packages (from pyk4a) (0.0.2) Requirement already satisfied: numpy in c:\users\ayeuser4\appdata\local\programs\python\python38\lib\site-packages (from pyk4a) (1.19.5) Installing collected packages: pyk4a Successfully installed pyk4a-1.3.0

When I tried to run the basic example displaying the first frame that you gave to test out, I got this error: from pyk4a import PyK4A ModuleNotFoundError: No module named ‘pyk4a’

so I installed pyk4a again through pycharm python interpreter and run the code again and I get this error: ImportError: Cannot import k4a_module. DLL directory added was C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\AMD64\release\bin. You can provide a different path containing k4a.dllusing the environment variable K4A_DLL_DIR. Also make sure pyk4a was properly built.

I’m a beginner and very clueless on how to fix this, can you help please?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rajkunducommented, May 27, 2022

Seems to be caused by an Anaconda issue described in #167!

0reactions
mhdadkcommented, Jun 13, 2022

In case this helps anyone, editing the Windows Path environment variable fixed this for me. I edited the Path variable using the Windows GUI and not using PowerShell. Here is how I did this:

  1. Hit the Windows key, and search “env”.
  2. Click on “Edit the system environment variables”.
  3. Enter your credentials as needed.
  4. Click on “Environment Variables…”
  5. Under “User variables for your username”, double-click on “Path”.
  6. Click on “New”.
  7. Paste in C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\bin (remember to replace v1.3.0 with your version).
  8. Click on “OK”.
  9. Under “System variables”, double-click on “Path”.
  10. Click on “New”.
  11. Paste in C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\bin (remember to replace v1.3.0 with your version).
  12. Click on “OK” and close all the windows.
  13. I’m using Spyder, so I restarted my IPython kernel, and then import pyk4a worked for me with no errors.
Read more comments on GitHub >

github_iconTop Results From Across the Web

pyk4a - PyPI
pyk4a. CI codecov. pyk4a. This library is a simple and pythonic wrapper in Python 3 for the Azure-Kinect-Sensor-SDK. Images are returned as numpy...
Read more >
Azure Kinect with Open3D
Follow this guide to install the Azure Kinect SDK (K4A). ... If you build the compiled Open3D Python module, Open3D's __init__.py will try...
Read more >
LNK1104 cannot open file 'k4a::k4a.lib' - Stack Overflow
I want to run this example from azure kinect sdk and have a problem in building. I am using cmake to build but...
Read more >
ABB S202-K4A Miniature Breaker 2CDS252001R0337 - eBay
ABB S202 K4A 4A Circuit Breaker S202K4A (Pack of 2). $36.44. Free shipping ... Allen-Bradley 1769-PA4 CompactLogix AC Power Supply Module New Factory...
Read more >
kinect2 python接口- CSDN
from pykinect2 import PyKinectV2 from pykinect2 import PyKinectRuntime import cv2 import numpy as np # 获取深度图, 默认尺寸424x512 def get_last_depth(): ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found