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
|