install freenect for SimpleCV-Python failed under ubuntu 11.10

1,103 views
Skip to first unread message

Bilal

unread,
Mar 24, 2012, 5:17:56 AM3/24/12
to OpenKinect
Hi all,
Any step by step instructions to install freenect for python on ubuntu
11.10 ?
i have freenect-glview work fun as do all others examples of freenect
Under python environnement, when i type:
>>>import cv
>>> import freenect
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/dist-packages/freenect.so:
undefined symbol: freenect_set_video_mode

for example i wish to try this simple example:
http://examples.simplecv.org/en/latest/examples/kinect.html
any suggestion my ubuntu 11.10 is install in 64-bits machine?
thanks in advance,
--
Bilal

Nicolas Bourdaud

unread,
Mar 24, 2012, 10:44:28 AM3/24/12
to openk...@googlegroups.com, Bilal
Hi Bilal,

On 24/03/2012 10:17, Bilal wrote:
> Hi all,
> Any step by step instructions to install freenect for python on ubuntu
> 11.10 ?
> i have freenect-glview work fun as do all others examples of freenect
> Under python environnement, when i type:
>>>> import cv
>>>> import freenect
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: /usr/local/lib/python2.7/dist-packages/freenect.so:
> undefined symbol: freenect_set_video_mode

It is indeed strange because the version shipped with Ubuntu 11.10 is an
old version of libfreenect that does not use the symbol
freenect_set_video_mode (which has been introduced by later version of
libfreenect). It looks like you use a recent version of the package
python-freenect with an old version of libfreenect0.0 (the shared library).

So could you elaborate a little bit more about the way you have
installed libfreenect:
- Have you enabled any repository (either Florian Echtler's PPA,
NeuroDebian repository or another one that I don't know) ?
- Have you compiled and installed any component of libfreenect from the
sources?
- If so which version (the git tag or the commit)?
- If you have not compiled and installed any libfreenect component, What
is the results of the command 'dpkg -l *freenect*' ?

Cheers,

Nicolas Bourdaud

signature.asc

Nicolas Bourdaud

unread,
Mar 24, 2012, 10:53:23 AM3/24/12
to openk...@googlegroups.com, Bilal
On 24/03/2012 15:44, Nicolas Bourdaud wrote:
>
> So could you elaborate a little bit more about the way you have
> installed libfreenect:
> - Have you enabled any repository (either Florian Echtler's PPA,
> NeuroDebian repository or another one that I don't know) ?
> - Have you compiled and installed any component of libfreenect from the
> sources?
> - If so which version (the git tag or the commit)?
> - If you have not compiled and installed any libfreenect component, What
> is the results of the command 'dpkg -l *freenect*' ?

I also forgot... what is the result of this command:
ldd /usr/local/lib/python2.7/dist-packages/freenect.so

Cheers,

Nicolas

signature.asc

Bilal

unread,
Mar 24, 2012, 12:37:03 PM3/24/12
to OpenKinect
Hi Nicolas,
I have tried a both .deb and manual installation from:
http://www.ubuntuupdates.org/package/core/oneiric/universe/base/python-freenect
and
http://openkinect.org/wiki/Getting_Started#Ubuntu_Manual_Install
respectively!
note here when i clone to git clone git://github.com/OpenKinect/libfreenect.git
i have changed git://github.com/OpenKinect/libfreenect.git to https://...same
link) because i have an error of time out!

On Mar 24, 3:53 pm, Nicolas Bourdaud <nicolas.bourd...@gmail.com>
wrote:
> On 24/03/2012 15:44, Nicolas Bourdaud wrote:
>
>
>
> > So could you elaborate a little bit more about the way you have
> > installed libfreenect:
> > - Have you enabled any repository (either Florian Echtler's PPA,
> > NeuroDebian repository or another one that I don't know) ?
I don't remeber that i have do this step ! how can i do it ?
> > - Have you compiled and installed any component of libfreenect from the
> > sources?
> > - If so which version (the git tag or the commit)?
> > - If you have not compiled and installed any libfreenect component, What
> > is the results of the command 'dpkg -l *freenect*' ?
When i type 'dpkg-l *freenect*' i have:
bilal@Bilal-Ubunto:~/libfreenect/build/build$ dpkg -l *freenect*
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-
installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Description
+++-==============-==============-
============================================
ii freenect 1:0.0.1+201012 library for accessing Kinect USB
camera -- m
un libfreenect <none> (aucune description n'est
disponible)
ii libfreenect-de 1:0.0.1+201012 library for accessing Kinect USB
camera -- d
ii libfreenect-de 1:0.0.1+201012 library for accessing Kinect USB
camera -- d
ii libfreenect0.0 1:0.0.1+201012 library for accessing Kinect USB
camera
>
> I also forgot... what is the result of this command:
it's :
> ldd /usr/local/lib/python2.7/dist-packages/freenect.so
linux-gate.so.1 => (0xb7751000)
libfreenect.so.0.0 => /usr/lib/libfreenect.so.0.0 (0xb7733000)
libfreenect_sync.so.0.0 => /usr/lib/libfreenect_sync.so.0.0
(0xb772f000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f6000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb757a000)
libusb-1.0.so.0 => /lib/i386-linux-gnu/libusb-1.0.so.0 (0xb756b000)
/lib/ld-linux.so.2 (0xb7752000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7562000)

finaly, for SimpleCV installation i tried :
http://www.simplecv.org/doc/installation.html (section ubuntu 11.10).

and is the same problem i have when i tried to install it in another
machine for Windows7
here a error:
SimpleCV:3>k = Kinect()
C:\Python27\lib\site-packages\simplecv-1.2-py2.7.egg\SimpleCV
\Camera.py:406: Use
rWarning: You don't seem to have the freenect library installed. This
will make
it hard to use a Kinect.
SimpleCV:4>
>
I realy need suggestions,
Cheers
--
Bilal
> Cheers,
>
> Nicolas
>
>  signature.asc
> < 1KViewDownload

Nicolas Bourdaud

unread,
Mar 24, 2012, 2:10:36 PM3/24/12
to openk...@googlegroups.com, Bilal
Ok I think I have understood what has happened to you. As I feared
initially, you mixed different installations with different versions
that conflict with each other:
Your python module comes from the one version you have compiled from the
git repository (the most recent), and it tries to use the library
shipped with Ubuntu 11.10 (a quite old version).

So I am going to help you to recover to a sane state. What I propose to
you is to remove the version you have compiled and use a recent version
from a NeuroDebian repository.

Why I suggest Neurodebian? Simply because you can find there the
backports of the latest packages for libfreenect (backported from
Debian) for all supported versions of Ubuntu and Debian. So the packages
there are the versions you will find in the next Debian/Ubuntu releases.

_Step 1_: Clean up the compiled version
- Go to the folder where you have compiled the library. It should be
<something>/libfreenect/build if you have used the instructions on the wiki.
- execute from there: 'sudo make uninstall'
- Remove the udev rules you might have created:
sudo rm /etc/udev/rules.d/*-kinect.rules

_Step 2_: Install NeuroDebian repository
- execute the commands (they are the same as those described on the
frontpage of http://neuro.debian.net):
wget -O- http://neuro.debian.net/lists/oneiric.us-nh | sudo tee
/etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
sudo apt-get update

_Step 3_: Install the python-freenect package (and the others)
- execute the command:
sudo apt-get install libfreenect-dev python-freenect libfreenect-bin
- Verify your user belongs to the group plugdev (this is the default for
a desktop user) by checking that the execution of this line returns
something:
groups | grep plugdev
- If the previous command returns nothing, execute:
sudo adduser $USER plugdev
- logout and log back in if you have added your user to the plugdev group


At this step, you should be good, your python and libfreenect library
should be up to date.

On 24/03/2012 17:37, Bilal wrote:
>> ldd /usr/local/lib/python2.7/dist-packages/freenect.so
> linux-gate.so.1 => (0xb7751000)
> libfreenect.so.0.0 => /usr/lib/libfreenect.so.0.0 (0xb7733000)
> libfreenect_sync.so.0.0 => /usr/lib/libfreenect_sync.so.0.0
> (0xb772f000)
> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f6000)
> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb757a000)
> libusb-1.0.so.0 => /lib/i386-linux-gnu/libusb-1.0.so.0 (0xb756b000)
> /lib/ld-linux.so.2 (0xb7752000)
> librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7562000)

You mentioned in your first email that the Ubuntu version installed was
64 bits. Are you sure of this? It is not what is suggested here from
execution of ldd or you have a mixed environment. Whether your installed
distribution is 32bits or 64 bits is not important (and does not affect
the instructions I have provided at the beginning of the email) but you
might suffer from some issues if you have installed earlier libfreenect
packages for 32bits on a 64bits installation. If it is the case, I
suggest you remove them before you run the previous instructions.


> and is the same problem i have when i tried to install it in another
> machine for Windows7
> here a error:
> SimpleCV:3>k = Kinect()
> C:\Python27\lib\site-packages\simplecv-1.2-py2.7.egg\SimpleCV
> \Camera.py:406: Use
> rWarning: You don't seem to have the freenect library installed. This
> will make
> it hard to use a Kinect.
> SimpleCV:4>

I cannot help you here. I don't use Windows very often and have never
used python on Windows (more than 5 mins).

> I realy need suggestions,

I hope my email will help you...
But if I can give you a piece of advise, do not install deb packages
manually if you can avoid. Always prefer using apt-get or synaptic or
whichever frontend you like.

Cheers,

Nicolas


signature.asc

Bilal

unread,
Mar 24, 2012, 3:31:44 PM3/24/12
to OpenKinect, nicolas....@gmail.com
Ok thank you Nicolas,
I have fellowed the uninstall/install instructions but:
For uninstall steps i think it's OK! but when i type:
sudo tee /etc/apt/sources.list.d/neurodebian.sources.list to install
Neurodebian, this command take several minutes (>> 30min) and i still
waiting for response now !!!
Is that related to the fact that I'm behind a university firewall ?
Should i set system-wide proxy settings ?

Cheers
--
Bilal

On Mar 24, 7:10 pm, Nicolas Bourdaud <nicolas.bourd...@gmail.com>
wrote:
> Ok I think I have understood what has happened to you. As I feared
> initially, you mixed different installations with different versions
> that conflict with each other:
> Your python module comes from the one version you have compiled from the
> git repository (the most recent), and it tries to use the library
> shipped with Ubuntu 11.10 (a quite old version).
>
> So I am going to help you to recover to a sane state. What I propose to
> you is to remove the version you have compiled and use a recent version
> from a NeuroDebian repository.
>
> Why I suggest Neurodebian? Simply because you can find there the
> backports of the latest packages for libfreenect (backported from
> Debian) for all supported versions of Ubuntu and Debian. So the packages
> there are the versions you will find in the next Debian/Ubuntu releases.
>
> _Step 1_: Clean up the compiled version
> - Go to the folder where you have compiled the library. It should be
> <something>/libfreenect/build if you have used the instructions on the wiki.
> - execute from there: 'sudo make uninstall'
> - Remove the udev rules you might have created:
> sudo rm /etc/udev/rules.d/*-kinect.rules
>
> _Step 2_: Install NeuroDebian repository
> - execute the commands (they are the same as those described on the
> frontpage ofhttp://neuro.debian.net):
> wget -O-http://neuro.debian.net/lists/oneiric.us-nh| sudo tee
>  signature.asc
> < 1KViewDownload

Nicolas Bourdaud

unread,
Mar 24, 2012, 4:35:11 PM3/24/12
to Bilal, OpenKinect
Hi Bilal!

On 24/03/2012 20:31, Bilal wrote:
> Ok thank you Nicolas,
> I have fellowed the uninstall/install instructions but:
> For uninstall steps i think it's OK! but when i type:
> sudo tee /etc/apt/sources.list.d/neurodebian.sources.list to install
> Neurodebian, this command take several minutes (>> 30min) and i still
> waiting for response now !!!

:-) you have simply misunderstood... It should have been one command:


wget -O-http://neuro.debian.net/lists/oneiric.us-nh| sudo tee
/etc/apt/sources.list.d/neurodebian.sources.list

I have quickly written some instructions on the wiki to make it clearer:
http://openkinect.org/wiki/Getting_Started#NeuroDebian_repository

> Is that related to the fact that I'm behind a university firewall ?
> Should i set system-wide proxy settings ?

No, not related at all. Don't change any thing about this :-)

Cheers,

Nicolas

signature.asc

Bilal

unread,
Mar 25, 2012, 7:32:26 AM3/25/12
to OpenKinect, nicolas....@gmail.com
yah !Now it work fun !
I really appreciate your help, thx

Cheers
---
Bilal
Reply all
Reply to author
Forward
0 new messages