All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* babeltrace-python bindings
@ 2014-11-04 22:37 Bin YE
  0 siblings, 0 replies; 9+ messages in thread
From: Bin YE @ 2014-11-04 22:37 UTC (permalink / raw
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 596 bytes --]

Hi there

i have installed Lttng and babeltrace
my system:Ubuntu 14.04LTS
I have made following steps

sudo apt-add-repository ppa:lttng/ppa
sudo apt-get update
sudo apt-get install lttng-tools
sudo apt-get install lttng-modules-dkms
sudo apt-get install liblttng-ust-dev

export PYTHON="python3"
export PYTHON_CONFIG="/usr/bin/python3-config"

./configure --enable-python-bindings
 make
 make install
 ldconfig

but i still can not use babeltrace python bindings
when i run import babeltrace it output error with no module

I really need you help about it
Thank you very much in advance

Bin Ye

[-- Attachment #1.2: Type: text/html, Size: 805 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found] <CAETqSHAgdD8_9XZZvc_LTmD_pUHSV=i05h4sqww7gDFf+WGU+w@mail.gmail.com>
@ 2014-11-05  0:22 ` Francis Deslauriers
  2014-11-05  5:56 ` Philippe Proulx
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Francis Deslauriers @ 2014-11-05  0:22 UTC (permalink / raw
  To: Bin YE; +Cc: lttng-dev

Hi,

Do you get any errors at configure or compile time?

Cheers,

Francis

On Tue, Nov 4, 2014 at 5:37 PM, Bin YE <yebinianhi@gmail.com> wrote:
> Hi there
>
> i have installed Lttng and babeltrace
> my system:Ubuntu 14.04LTS
> I have made following steps
>
> sudo apt-add-repository ppa:lttng/ppa
> sudo apt-get update
> sudo apt-get install lttng-tools
> sudo apt-get install lttng-modules-dkms
> sudo apt-get install liblttng-ust-dev
>
> export PYTHON="python3"
> export PYTHON_CONFIG="/usr/bin/python3-config"
>
> ./configure --enable-python-bindings
>  make
>  make install
>  ldconfig
>
> but i still can not use babeltrace python bindings
> when i run import babeltrace it output error with no module
>
> I really need you help about it
> Thank you very much in advance
>
> Bin Ye
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found] <CAETqSHAgdD8_9XZZvc_LTmD_pUHSV=i05h4sqww7gDFf+WGU+w@mail.gmail.com>
  2014-11-05  0:22 ` babeltrace-python bindings Francis Deslauriers
@ 2014-11-05  5:56 ` Philippe Proulx
  2014-11-05 16:29 ` Julien Desfossez
       [not found] ` <545A504E.10007@efficios.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Philippe Proulx @ 2014-11-05  5:56 UTC (permalink / raw
  To: Bin YE; +Cc: lttng-dev@lists.lttng.org

On Tue, Nov 4, 2014 at 5:37 PM, Bin YE <yebinianhi@gmail.com> wrote:
> Hi there
>
> i have installed Lttng and babeltrace
> my system:Ubuntu 14.04LTS
> I have made following steps
>
> sudo apt-add-repository ppa:lttng/ppa
> sudo apt-get update
> sudo apt-get install lttng-tools
> sudo apt-get install lttng-modules-dkms
> sudo apt-get install liblttng-ust-dev
>
> export PYTHON="python3"
> export PYTHON_CONFIG="/usr/bin/python3-config"
>
> ./configure --enable-python-bindings
>  make
>  make install
>  ldconfig
>
> but i still can not use babeltrace python bindings
> when i run import babeltrace it output error with no module

What is the output of this command:

    ls /usr/lib/python3.*/site-packages

?

Philippe Proulx
>
> I really need you help about it
> Thank you very much in advance
>
> Bin Ye
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found] <CAETqSHAgdD8_9XZZvc_LTmD_pUHSV=i05h4sqww7gDFf+WGU+w@mail.gmail.com>
  2014-11-05  0:22 ` babeltrace-python bindings Francis Deslauriers
  2014-11-05  5:56 ` Philippe Proulx
@ 2014-11-05 16:29 ` Julien Desfossez
       [not found] ` <545A504E.10007@efficios.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Julien Desfossez @ 2014-11-05 16:29 UTC (permalink / raw
  To: Bin YE, lttng-dev

Hi,

The problem resides with the default search path of Python on Debian/Ubuntu.
When installing manually a Python library, it is installed in
/usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu does
not look into this path but does look into dist-packages...

So you can either symlink /usr/local/lib/python3.x/dist-packages so
/usr/local/lib/python3.x/site-packages which is ugly.

Or use this kind of hack at the beginning of your Python program :
try:
    from babeltrace import TraceCollection
except ImportError:
    # quick fix for debian-based distros
    sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
                   (sys.version_info.major, sys.version_info.minor))
    from babeltrace import TraceCollection

You can have a look at this bug report about why it will probably never
be fixed...
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022

I hope the workaround at least solves the problem you are having,

Julien

On 14-11-04 05:37 PM, Bin YE wrote:
> Hi there
> 
> i have installed Lttng and babeltrace
> my system:Ubuntu 14.04LTS
> I have made following steps
> 
> sudo apt-add-repository ppa:lttng/ppa
> sudo apt-get update
> sudo apt-get install lttng-tools
> sudo apt-get install lttng-modules-dkms
> sudo apt-get install liblttng-ust-dev
> 
> export PYTHON="python3"
> export PYTHON_CONFIG="/usr/bin/python3-config"
> 
> ./configure --enable-python-bindings
>  make
>  make install
>  ldconfig
> 
> but i still can not use babeltrace python bindings
> when i run import babeltrace it output error with no module
> 
> I really need you help about it
> Thank you very much in advance
> 
> Bin Ye
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found] ` <545A504E.10007@efficios.com>
@ 2014-11-05 21:02   ` Jérémie Galarneau
       [not found]   ` <CA+jJMxsxYEhJwT4KufMzKmJFKz0-cfJ2hc6gQGAkyxM6sDoMgg@mail.gmail.com>
  1 sibling, 0 replies; 9+ messages in thread
From: Jérémie Galarneau @ 2014-11-05 21:02 UTC (permalink / raw
  To: Julien Desfossez; +Cc: Bin YE, lttng-dev@lists.lttng.org

This commit in the master branch should perform the detection and
install the module under dist-packages when using Debian. Could anyone
confirm it works on Ubuntu? I can backport it to stable-1.2 if it
helps.

commit 1b39e2de5485147dd3dc7089c4edfd685d5cad96
Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date:   Thu Oct 16 16:36:10 2014 -0400

    Detect Python packages directory on configure

    The Python interpreter on Debian is configured to use
    ...lib/python.../dist-packages instead of
    .../lib/python.../site-packages to look for extra modules.

    python_modules.m4 performs a runtime python check of the
    sys.path variable to check wether the selected interpreter is
    configured to use site-packages vs dist-packages.

    Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

Regards,
Jérémie

On Wed, Nov 5, 2014 at 11:29 AM, Julien Desfossez
<jdesfossez@efficios.com> wrote:
> Hi,
>
> The problem resides with the default search path of Python on Debian/Ubuntu.
> When installing manually a Python library, it is installed in
> /usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu does
> not look into this path but does look into dist-packages...
>
> So you can either symlink /usr/local/lib/python3.x/dist-packages so
> /usr/local/lib/python3.x/site-packages which is ugly.
>
> Or use this kind of hack at the beginning of your Python program :
> try:
>     from babeltrace import TraceCollection
> except ImportError:
>     # quick fix for debian-based distros
>     sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
>                    (sys.version_info.major, sys.version_info.minor))
>     from babeltrace import TraceCollection
>
> You can have a look at this bug report about why it will probably never
> be fixed...
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022
>
> I hope the workaround at least solves the problem you are having,
>
> Julien
>
> On 14-11-04 05:37 PM, Bin YE wrote:
>> Hi there
>>
>> i have installed Lttng and babeltrace
>> my system:Ubuntu 14.04LTS
>> I have made following steps
>>
>> sudo apt-add-repository ppa:lttng/ppa
>> sudo apt-get update
>> sudo apt-get install lttng-tools
>> sudo apt-get install lttng-modules-dkms
>> sudo apt-get install liblttng-ust-dev
>>
>> export PYTHON="python3"
>> export PYTHON_CONFIG="/usr/bin/python3-config"
>>
>> ./configure --enable-python-bindings
>>  make
>>  make install
>>  ldconfig
>>
>> but i still can not use babeltrace python bindings
>> when i run import babeltrace it output error with no module
>>
>> I really need you help about it
>> Thank you very much in advance
>>
>> Bin Ye
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found]   ` <CA+jJMxsxYEhJwT4KufMzKmJFKz0-cfJ2hc6gQGAkyxM6sDoMgg@mail.gmail.com>
@ 2014-11-06  2:00     ` Julien Desfossez
       [not found]     ` <545AD623.7080408@efficios.com>
  1 sibling, 0 replies; 9+ messages in thread
From: Julien Desfossez @ 2014-11-06  2:00 UTC (permalink / raw
  To: Jérémie Galarneau, Julien Desfossez
  Cc: Bin YE, lttng-dev@lists.lttng.org

Tested on a fresh Ubuntu 14.04 install and it works !

Thanks :-) !!

On 14-11-05 04:02 PM, Jérémie Galarneau wrote:
> This commit in the master branch should perform the detection and
> install the module under dist-packages when using Debian. Could anyone
> confirm it works on Ubuntu? I can backport it to stable-1.2 if it
> helps.
> 
> commit 1b39e2de5485147dd3dc7089c4edfd685d5cad96
> Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
> Date:   Thu Oct 16 16:36:10 2014 -0400
> 
>     Detect Python packages directory on configure
> 
>     The Python interpreter on Debian is configured to use
>     ...lib/python.../dist-packages instead of
>     .../lib/python.../site-packages to look for extra modules.
> 
>     python_modules.m4 performs a runtime python check of the
>     sys.path variable to check wether the selected interpreter is
>     configured to use site-packages vs dist-packages.
> 
>     Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
> 
> Regards,
> Jérémie
> 
> On Wed, Nov 5, 2014 at 11:29 AM, Julien Desfossez
> <jdesfossez@efficios.com> wrote:
>> Hi,
>>
>> The problem resides with the default search path of Python on Debian/Ubuntu.
>> When installing manually a Python library, it is installed in
>> /usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu does
>> not look into this path but does look into dist-packages...
>>
>> So you can either symlink /usr/local/lib/python3.x/dist-packages so
>> /usr/local/lib/python3.x/site-packages which is ugly.
>>
>> Or use this kind of hack at the beginning of your Python program :
>> try:
>>     from babeltrace import TraceCollection
>> except ImportError:
>>     # quick fix for debian-based distros
>>     sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
>>                    (sys.version_info.major, sys.version_info.minor))
>>     from babeltrace import TraceCollection
>>
>> You can have a look at this bug report about why it will probably never
>> be fixed...
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022
>>
>> I hope the workaround at least solves the problem you are having,
>>
>> Julien
>>
>> On 14-11-04 05:37 PM, Bin YE wrote:
>>> Hi there
>>>
>>> i have installed Lttng and babeltrace
>>> my system:Ubuntu 14.04LTS
>>> I have made following steps
>>>
>>> sudo apt-add-repository ppa:lttng/ppa
>>> sudo apt-get update
>>> sudo apt-get install lttng-tools
>>> sudo apt-get install lttng-modules-dkms
>>> sudo apt-get install liblttng-ust-dev
>>>
>>> export PYTHON="python3"
>>> export PYTHON_CONFIG="/usr/bin/python3-config"
>>>
>>> ./configure --enable-python-bindings
>>>  make
>>>  make install
>>>  ldconfig
>>>
>>> but i still can not use babeltrace python bindings
>>> when i run import babeltrace it output error with no module
>>>
>>> I really need you help about it
>>> Thank you very much in advance
>>>
>>> Bin Ye
>>>
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 
> 
> 

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found]     ` <545AD623.7080408@efficios.com>
@ 2014-11-06 17:40       ` Alexandre Montplaisir
       [not found]       ` <545BB277.90906@voxpopuli.im>
  2014-11-06 17:55       ` Jérémie Galarneau
  2 siblings, 0 replies; 9+ messages in thread
From: Alexandre Montplaisir @ 2014-11-06 17:40 UTC (permalink / raw
  To: Julien Desfossez, Jérémie Galarneau
  Cc: Bin YE, lttng-dev@lists.lttng.org

Hi,

Just a note, the python bindings are also packaged in the Debian/Ubuntu 
packages, under the "python3-babeltrace" package.

On Ubuntu it's only available on 12.10 and up though, but it should be 
available if one uses the PPA packages.

Cheers,
Alexandre


On 11/06/2014 03:00 AM, Julien Desfossez wrote:
> Tested on a fresh Ubuntu 14.04 install and it works !
>
> Thanks :-) !!
>
> On 14-11-05 04:02 PM, Jérémie Galarneau wrote:
>> This commit in the master branch should perform the detection and
>> install the module under dist-packages when using Debian. Could anyone
>> confirm it works on Ubuntu? I can backport it to stable-1.2 if it
>> helps.
>>
>> commit 1b39e2de5485147dd3dc7089c4edfd685d5cad96
>> Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>> Date:   Thu Oct 16 16:36:10 2014 -0400
>>
>>      Detect Python packages directory on configure
>>
>>      The Python interpreter on Debian is configured to use
>>      ...lib/python.../dist-packages instead of
>>      .../lib/python.../site-packages to look for extra modules.
>>
>>      python_modules.m4 performs a runtime python check of the
>>      sys.path variable to check wether the selected interpreter is
>>      configured to use site-packages vs dist-packages.
>>
>>      Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>>
>> Regards,
>> Jérémie
>>
>> On Wed, Nov 5, 2014 at 11:29 AM, Julien Desfossez
>> <jdesfossez@efficios.com> wrote:
>>> Hi,
>>>
>>> The problem resides with the default search path of Python on Debian/Ubuntu.
>>> When installing manually a Python library, it is installed in
>>> /usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu does
>>> not look into this path but does look into dist-packages...
>>>
>>> So you can either symlink /usr/local/lib/python3.x/dist-packages so
>>> /usr/local/lib/python3.x/site-packages which is ugly.
>>>
>>> Or use this kind of hack at the beginning of your Python program :
>>> try:
>>>      from babeltrace import TraceCollection
>>> except ImportError:
>>>      # quick fix for debian-based distros
>>>      sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
>>>                     (sys.version_info.major, sys.version_info.minor))
>>>      from babeltrace import TraceCollection
>>>
>>> You can have a look at this bug report about why it will probably never
>>> be fixed...
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022
>>>
>>> I hope the workaround at least solves the problem you are having,
>>>
>>> Julien
>>>
>>> On 14-11-04 05:37 PM, Bin YE wrote:
>>>> Hi there
>>>>
>>>> i have installed Lttng and babeltrace
>>>> my system:Ubuntu 14.04LTS
>>>> I have made following steps
>>>>
>>>> sudo apt-add-repository ppa:lttng/ppa
>>>> sudo apt-get update
>>>> sudo apt-get install lttng-tools
>>>> sudo apt-get install lttng-modules-dkms
>>>> sudo apt-get install liblttng-ust-dev
>>>>
>>>> export PYTHON="python3"
>>>> export PYTHON_CONFIG="/usr/bin/python3-config"
>>>>
>>>> ./configure --enable-python-bindings
>>>>   make
>>>>   make install
>>>>   ldconfig
>>>>
>>>> but i still can not use babeltrace python bindings
>>>> when i run import babeltrace it output error with no module
>>>>
>>>> I really need you help about it
>>>> Thank you very much in advance
>>>>
>>>> Bin Ye
>>>>
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found]       ` <545BB277.90906@voxpopuli.im>
@ 2014-11-06 17:48         ` Alexandre Montplaisir
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandre Montplaisir @ 2014-11-06 17:48 UTC (permalink / raw
  To: Julien Desfossez, Jérémie Galarneau
  Cc: Bin YE, lttng-dev@lists.lttng.org

 > Ubuntu 12.10

I meant 14.10 (Utopic), my bad.


On 11/06/2014 06:40 PM, Alexandre Montplaisir wrote:
> Hi,
>
> Just a note, the python bindings are also packaged in the 
> Debian/Ubuntu packages, under the "python3-babeltrace" package.
>
> On Ubuntu it's only available on 12.10 and up though, but it should be 
> available if one uses the PPA packages.
>
> Cheers,
> Alexandre
>
>
> On 11/06/2014 03:00 AM, Julien Desfossez wrote:
>> Tested on a fresh Ubuntu 14.04 install and it works !
>>
>> Thanks :-) !!
>>
>> On 14-11-05 04:02 PM, Jérémie Galarneau wrote:
>>> This commit in the master branch should perform the detection and
>>> install the module under dist-packages when using Debian. Could anyone
>>> confirm it works on Ubuntu? I can backport it to stable-1.2 if it
>>> helps.
>>>
>>> commit 1b39e2de5485147dd3dc7089c4edfd685d5cad96
>>> Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>>> Date:   Thu Oct 16 16:36:10 2014 -0400
>>>
>>>      Detect Python packages directory on configure
>>>
>>>      The Python interpreter on Debian is configured to use
>>>      ...lib/python.../dist-packages instead of
>>>      .../lib/python.../site-packages to look for extra modules.
>>>
>>>      python_modules.m4 performs a runtime python check of the
>>>      sys.path variable to check wether the selected interpreter is
>>>      configured to use site-packages vs dist-packages.
>>>
>>>      Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>>>
>>> Regards,
>>> Jérémie
>>>
>>> On Wed, Nov 5, 2014 at 11:29 AM, Julien Desfossez
>>> <jdesfossez@efficios.com> wrote:
>>>> Hi,
>>>>
>>>> The problem resides with the default search path of Python on 
>>>> Debian/Ubuntu.
>>>> When installing manually a Python library, it is installed in
>>>> /usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu 
>>>> does
>>>> not look into this path but does look into dist-packages...
>>>>
>>>> So you can either symlink /usr/local/lib/python3.x/dist-packages so
>>>> /usr/local/lib/python3.x/site-packages which is ugly.
>>>>
>>>> Or use this kind of hack at the beginning of your Python program :
>>>> try:
>>>>      from babeltrace import TraceCollection
>>>> except ImportError:
>>>>      # quick fix for debian-based distros
>>>> sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
>>>>                     (sys.version_info.major, sys.version_info.minor))
>>>>      from babeltrace import TraceCollection
>>>>
>>>> You can have a look at this bug report about why it will probably 
>>>> never
>>>> be fixed...
>>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022
>>>>
>>>> I hope the workaround at least solves the problem you are having,
>>>>
>>>> Julien
>>>>
>>>> On 14-11-04 05:37 PM, Bin YE wrote:
>>>>> Hi there
>>>>>
>>>>> i have installed Lttng and babeltrace
>>>>> my system:Ubuntu 14.04LTS
>>>>> I have made following steps
>>>>>
>>>>> sudo apt-add-repository ppa:lttng/ppa
>>>>> sudo apt-get update
>>>>> sudo apt-get install lttng-tools
>>>>> sudo apt-get install lttng-modules-dkms
>>>>> sudo apt-get install liblttng-ust-dev
>>>>>
>>>>> export PYTHON="python3"
>>>>> export PYTHON_CONFIG="/usr/bin/python3-config"
>>>>>
>>>>> ./configure --enable-python-bindings
>>>>>   make
>>>>>   make install
>>>>>   ldconfig
>>>>>
>>>>> but i still can not use babeltrace python bindings
>>>>> when i run import babeltrace it output error with no module
>>>>>
>>>>> I really need you help about it
>>>>> Thank you very much in advance
>>>>>
>>>>> Bin Ye
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> lttng-dev mailing list
>>>>> lttng-dev@lists.lttng.org
>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>
>>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: babeltrace-python bindings
       [not found]     ` <545AD623.7080408@efficios.com>
  2014-11-06 17:40       ` Alexandre Montplaisir
       [not found]       ` <545BB277.90906@voxpopuli.im>
@ 2014-11-06 17:55       ` Jérémie Galarneau
  2 siblings, 0 replies; 9+ messages in thread
From: Jérémie Galarneau @ 2014-11-06 17:55 UTC (permalink / raw
  To: Julien Desfossez; +Cc: Bin YE, lttng-dev@lists.lttng.org

On Wed, Nov 5, 2014 at 9:00 PM, Julien Desfossez
<jdesfossez@efficios.com> wrote:
> Tested on a fresh Ubuntu 14.04 install and it works !
>
> Thanks :-) !!

Thanks for testing!

I have backported the fix to the stable-1.2 branch.

commit 33287b163aa7d5b066be157d8c67c4f7bca2d618
Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date:   Thu Oct 16 16:36:10 2014 -0400

    Detect Python packages directory on configure

    The Python interpreter on Debian is configurated to use
    ...lib/python.../dist-packages instead of
    .../lib/python.../site-packages to look for extra modules.

    python_modules.m4 performs a runtime python check of the
    sys.path variable to check wether the selected interpreter is
    configurated to use site-packages vs dist-packages.

    Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>


Jérémie

>
> On 14-11-05 04:02 PM, Jérémie Galarneau wrote:
>> This commit in the master branch should perform the detection and
>> install the module under dist-packages when using Debian. Could anyone
>> confirm it works on Ubuntu? I can backport it to stable-1.2 if it
>> helps.
>>
>> commit 1b39e2de5485147dd3dc7089c4edfd685d5cad96
>> Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>> Date:   Thu Oct 16 16:36:10 2014 -0400
>>
>>     Detect Python packages directory on configure
>>
>>     The Python interpreter on Debian is configured to use
>>     ...lib/python.../dist-packages instead of
>>     .../lib/python.../site-packages to look for extra modules.
>>
>>     python_modules.m4 performs a runtime python check of the
>>     sys.path variable to check wether the selected interpreter is
>>     configured to use site-packages vs dist-packages.
>>
>>     Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
>>
>> Regards,
>> Jérémie
>>
>> On Wed, Nov 5, 2014 at 11:29 AM, Julien Desfossez
>> <jdesfossez@efficios.com> wrote:
>>> Hi,
>>>
>>> The problem resides with the default search path of Python on Debian/Ubuntu.
>>> When installing manually a Python library, it is installed in
>>> /usr/local/lib/python3.x/site-packages, but Python on Debian/Ubuntu does
>>> not look into this path but does look into dist-packages...
>>>
>>> So you can either symlink /usr/local/lib/python3.x/dist-packages so
>>> /usr/local/lib/python3.x/site-packages which is ugly.
>>>
>>> Or use this kind of hack at the beginning of your Python program :
>>> try:
>>>     from babeltrace import TraceCollection
>>> except ImportError:
>>>     # quick fix for debian-based distros
>>>     sys.path.append("/usr/local/lib/python%d.%d/site-packages" %
>>>                    (sys.version_info.major, sys.version_info.minor))
>>>     from babeltrace import TraceCollection
>>>
>>> You can have a look at this bug report about why it will probably never
>>> be fixed...
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765022
>>>
>>> I hope the workaround at least solves the problem you are having,
>>>
>>> Julien
>>>
>>> On 14-11-04 05:37 PM, Bin YE wrote:
>>>> Hi there
>>>>
>>>> i have installed Lttng and babeltrace
>>>> my system:Ubuntu 14.04LTS
>>>> I have made following steps
>>>>
>>>> sudo apt-add-repository ppa:lttng/ppa
>>>> sudo apt-get update
>>>> sudo apt-get install lttng-tools
>>>> sudo apt-get install lttng-modules-dkms
>>>> sudo apt-get install liblttng-ust-dev
>>>>
>>>> export PYTHON="python3"
>>>> export PYTHON_CONFIG="/usr/bin/python3-config"
>>>>
>>>> ./configure --enable-python-bindings
>>>>  make
>>>>  make install
>>>>  ldconfig
>>>>
>>>> but i still can not use babeltrace python bindings
>>>> when i run import babeltrace it output error with no module
>>>>
>>>> I really need you help about it
>>>> Thank you very much in advance
>>>>
>>>> Bin Ye
>>>>
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>>
>>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-06 17:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAETqSHAgdD8_9XZZvc_LTmD_pUHSV=i05h4sqww7gDFf+WGU+w@mail.gmail.com>
2014-11-05  0:22 ` babeltrace-python bindings Francis Deslauriers
2014-11-05  5:56 ` Philippe Proulx
2014-11-05 16:29 ` Julien Desfossez
     [not found] ` <545A504E.10007@efficios.com>
2014-11-05 21:02   ` Jérémie Galarneau
     [not found]   ` <CA+jJMxsxYEhJwT4KufMzKmJFKz0-cfJ2hc6gQGAkyxM6sDoMgg@mail.gmail.com>
2014-11-06  2:00     ` Julien Desfossez
     [not found]     ` <545AD623.7080408@efficios.com>
2014-11-06 17:40       ` Alexandre Montplaisir
     [not found]       ` <545BB277.90906@voxpopuli.im>
2014-11-06 17:48         ` Alexandre Montplaisir
2014-11-06 17:55       ` Jérémie Galarneau
2014-11-04 22:37 Bin YE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.