linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] __version__ not included in locals() of linpho


From: Ghislain MARY
Subject: Re: [Linphone-developers] __version__ not included in locals() of linphone module in Ubuntu but is in Raspberry Pi
Date: Tue, 18 Aug 2015 17:39:41 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi,

I think the version you installed with "sudo pip install linphone --pre" is quite old and was not complete yet.
The distribution of wheel packages with native code with pip is not reliable. Instead get the latest version of the wheel package from http://linphone.org/snapshots/linphone-python/, eg. http://linphone.org/snapshots/linphone-python/linphone-3.8.5_363_ge196e55-cp27-none-linux_x86_64.whl and install it with "sudo pip install <pathtodownloadedfile>".

Cheers,
Ghislain

On 18/08/2015 16:52, Kenneth Martin wrote:
Installed linphone python on Ubuntu 15.04 using
>sudo pip install linphone --pre
when running got:

> python
Python 2.7.9 (default, Apr  2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import linphone
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/linphone/__init__.py", line 2, in <module>
    from linphone import __version__
ImportError: cannot import name __version__
>>>

Then did a small python script (test.py) that only contained 'import linphone' and ran it with
python -m pdb test.py
and single stepped into the import linphone call and doing a list found:

> python -m pdb test.py
> /home/Dropbox/Downloads/RPi/Audio/linphone/test.py(1)<module>()
-> import linphone
(Pdb) s
--Call--
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(1)<module>()
-> from linphone import *
(Pdb) l
  1  ->    from linphone import *
  2      from linphone import __version__
[EOF]
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(1)<module>()
-> from linphone import *
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(2)<module>()
-> from linphone import __version__
(Pdb) from linphone import __version__
*** ImportError: cannot import name __version__
(Pdb)

The first line of __init__.py worked worked fine; I then did a locals() and can't see any method called __version__ (see below).
Doing the same in the Raspberry Pi works fine and gives

(Pdb) l
  1      from linphone import *
  2  ->    from linphone import __version__
[EOF]
(Pdb) n
--Return--
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(2)<module>()->None
-> from linphone import __version__
(Pdb) __version__
'3.8.0'
(Pdb)

On the raspberry pi, locals() does include __version__

...
phone.Content'>, 'PresenceModel': <type 'linphone.PresenceModel'>, 'TunnelMode': <module 'TunnelMode' (built-in)>, '__version__': '3.8.0', 'RegistrationState': <module 'RegistrationState' (built-in)>, 'VideoSize': <type 'linphone.VideoSize'
...

Could this be a bug or am I doing something wrong? Any suggestions?
-Ken


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]