I am attempting to install a Python version of LinPhone. Following their Getting Started instructions, I tried to directly install by using sudo pip install linphone --pre
. This 'successfully' downloaded and installed linphone-3.9.1-py2-none-any.whl
During import
, though, I was getting an odd error (identical to this question, but using Python2.7), I removed linphone
and went to the Linphone Python Repository and downloaded the latest Mac .whl file and tried to install directly. But I get:
linphone-3.9.1_361_g26b0a20-cp27-none-macosx_10_7_x86_64.whl is not a supported wheel on this platform.
After finding this question I realized that this would not build on my macosx_10_11_intel
machine due to peptags... So I tried the obvious fix and renamed it linphone-3.9.1_361_g26b0a20-cp27-none-macosx_10_11_intel.whl
which allowed for the install, but caused a completely separate error.
Is there a proper way to install a macosx_10_7_x86_64
whl on a macosx_10_11_intel
platform outside of renaming the product? Shouldn't there be minimal difference between 10.7 and 10.11?
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import linphone
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/linphone/__init__.py", line 2, in <module>
from linphone import __version__
ImportError: cannot import name __version__
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import linphone
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/linphone/__init__.py", line 1, in <module>
from linphone import *
ImportError: dlopen(/Library/Python/2.7/site-packages/linphone/linphone.so, 2): Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /Library/Python/2.7/site-packages/linphone/linphone.so
Reason: image not found
I had this same problem, turns out the issue was caused when installing linphone package to the default macosx python 2.7.10 installation
I created a virtual environment using a new python 2.7.13 installation (rather than mac osx 2.7.10), installed linphone 3.10.2 from the wheel file here, and it works like a charm!
Note: 3.11.X didn't work for me, kept throwing errors
Running in a virtual env I no longer get the error:
ImportError "cannot import name __version__"
Hope this helps