Reputation: 61
I am trying to execute a python code using a kinect this is awesome.py:
from SimpleCV import *
import freenect
cam = Kinect()
depth = cam.getDepth()
depth.show()
and I'm getting this error:
Traceback (most recent call last):
File "awesome.py", line 2, in <module>
import freenect
ImportError: No module named freenect
libusb: 0.460928 debug [libusb_exit]
libusb: 0.461054 debug [usbi_remove_pollfd] remove fd 6
libusb: 0.461203 debug [usbi_remove_pollfd] remove fd 9
Upvotes: 0
Views: 5019
Reputation: 1188
This solved it for me. Note that you need to check if the names of your directories match mine. It depends on the Python versions you have installed:
sudo ln -s /usr/local/lib/python3/dist-packages/freenect.so /usr/local/lib/python3.7/dist-packages/.
That freenect.so was installed by default on Python3, so I've linked to it from Python3.7, which is the default for my system. You can find where it was installed by:
find /usr/local/lib -iname freenect.so
Hope it helps anybody.
Upvotes: 1
Reputation: 1
Install python-freenect and other necessary modules by first : apt-cache search freenect And then you can select all libfreenect packages as per your convenience: for this python code error: sudo apt-get install python-freenect
This worked for me on Ubuntu 14.04 LTS
Upvotes: 0
Reputation: 354
Install:
Try:
sudo python2 libfreenect/wrappers/python/demo_cv_async.py
Upvotes: 0