← Back to team overview

openshot.developers team mailing list archive

Re: Fwd: [Bug 439205] Re: OpenShot has not been installed in the Python path

 

On Thu, 2009-10-01 at 16:45 -0500, Jonathan Thomas wrote:
> TJ, some users are reporting an error while trying to "import mlt"
> after installing OpenShot from the PPA.  
> On Bug 439205 (https://bugs.launchpad.net/bugs/439205) specifically,
> this was the error from mlt.py: 
> 
> "File "/usr/lib/python2.6/dist-
> packages/mlt.py", line 7, in <module>
>    import _mlt
> ImportError: libmlt++.so.2"

This is caused by users installing the PPA packages without first
uninstalling the packages included in the dependency archive
(openshot-mlt, etc.).

The non-PPA packages are taking precedence due to the system path
search-order of Python.

The solution is:

sudo apt-get --purge remove openshot-mlt openshot-ffmpeg openshot-frei0r
openshot-x264

The clues are in Pablo's comment #8:

  File "/usr/lib/python2.6/dist-packages/mlt.py", line 7, in <module>
    import _mlt

The location referred to, "python2.6/dist-packages/", is NOT part of the
PPA package installation. The PPA package installs to a private location
and uses 'python-support' to link into all the installed python
versions. In the PPA package the location of the "mlt.py" referred to in
the error message above is "usr/share/python-support/python-mlt/mlt.py".

The reason Pablo's symbolic-link fixes the issue is this:

1. PPA libmlt++2 installs:

$ ls -l /usr/lib/libmlt++*
-rw-r--r-- 1 root root 126664 2009-09-30 09:47 /usr/lib/libmlt++.so.0.4.5
lrwxrwxrwx 1 root root 17 2009-09-30 18:12 /usr/lib/libmlt++.so.3 -> libmlt++.so.0.4.5

2. The dependencies.tar.gz contains the openshot-mlt package that installs into 

/usr/local/lib/ (note the LOCAL)

2a. /usr/local/lib/libmlt++.so.0.4.5 is sym-linked from /usr/local/lib/libmlt++.so.2
2b. The python wrapper file /usr/local/share/openshot/main/install/mlt.py imports the companion "_mlt.so"
2c. /usr/local/share/openshot/main/install/_mlt.so is dynamically linked with libmlt++.so.2:
 $ ldd _mlt.so
 linux-vdso.so.1 => (0x00007fffcfbff000)
 libmlt++.so.2 => not found
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f5fc76e5000)
 libc.so.6 => /lib/libc.so.6 (0x00007f5fc7372000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f5fc7b88000)

3. Adding a symbolic link from /usr/lib/libmlt++.so.2 to the
PPA's /usr/lib/libmlt++.so.3 completes the linkage.






References