pyk4a: Cannot import k4a_module

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?

About this issue

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

Most upvoted comments

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

@fatimahfirdauss I had exactly the same problem. I was using python 3.7. When I updated to 3.8 and reinstalled everything, it worked fine.