LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-29-2020, 07:25 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Python problem


No python expert here. I'm trying to install openshot, a python-heavy application. I found Slackware64 -Current precompiled packaged on the ponce.cc website and installed them on my Slackware64-Current system. Slackware does not do dependency tracking. It's easier overall, but can be a pain occasionally.

First run, it complained for the lack of 'PyQt5' and 'classes' modules. I installed them with pip3, but made the mistake of doing it as a luser, so it put them in /home/user/.local/bin, which didn't solve things. So I installed them as root, but it preferred the user versions :/

Then I uninstalled them all, installed as root, and that satisfied PyQt5, but it still bellyaches over the classes module thusly
Code:
bash-5.0$ openshot-qt
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/openshot_qt/launch.py", line 47, in <module>
    from classes import info
ImportError: cannot import name 'info' from 'classes' (/usr/lib64/python3.8/site-packages/classes/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/openshot-qt", line 11, in <module>
    load_entry_point('openshot-qt==2.4.4.dev2', 'gui_scripts', 'openshot-qt')()
  File "/usr/lib64/python3.8/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib64/python3.8/site-packages/pkg_resources/__init__.py", line 2853, in load_entry_point
    return ep.load()
  File "/usr/lib64/python3.8/site-packages/pkg_resources/__init__.py", line 2444, in load
    return self.resolve()
  File "/usr/lib64/python3.8/site-packages/pkg_resources/__init__.py", line 2450, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python3.8/site-packages/openshot_qt/launch.py", line 52, in <module>
    from classes import info
ImportError: cannot import name 'info' from 'classes' (/usr/lib64/python3.8/site-packages/classes/__init__.py)
Sorry for the long preamble. It's installing classes-0.1.0. Anyone suggest a next move?

Last edited by business_kid; 01-29-2020 at 07:28 AM.
 
Old 01-29-2020, 01:44 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,132
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
I'll give you all the info that I can get my hands on.
Code:
pacman -Si openshot
...
Name            : openshot
Version         : 2.4.4-4
Description     : An award-winning free and open-source video editor
Architecture    : any
URL             : https://www.openshot.org/
Licenses        : GPL3
...
Depends On      : ffmpeg  python-mlt  python-pyqt5  python-requests  libopenshot
                  libopenshot-audio  python-pyzmq  qt5-base  qt5-svg  qt5-webkit
Optional Deps   : faac: for exporting audio using AAC
...
Download Size   : 51.68 MiB
Installed Size  : 107.03 MiB
...

pacman -S openshot
resolving dependencies...
looking for conflicting packages...

Packages (13) jsoncpp-1.9.1-1  libebur128-1.2.4-1  libmagick6-6.9.10.84-1
              libopenshot-0.2.3-6  libopenshot-audio-0.1.8-3  libpgm-5.2.122-4
              libsodium-1.0.18-1  mlt-6.18.0-3  python-mlt-6.18.0-3
              python-pyzmq-18.1.1-1  qt5-multimedia-5.14.0-1  zeromq-4.3.2-1
              openshot-2.4.4-4

Total Download Size:    59.69 MiB
Total Installed Size:  140.93 MiB

:: Proceed with installation? [Y/n] n
Code:
asp export openshot
<get PKGBUILD> for arch....
...

#PKGBUILD
pkgname=openshot
pkgver=2.4.4
pkgrel=4
pkgdesc="An award-winning free and open-source video editor"
arch=('any')
url="https://www.openshot.org/"
license=('GPL3')
depends=('ffmpeg' 'python-mlt' 'python-pyqt5' 'python-requests' 'libopenshot'
'libopenshot-audio' 'python-pyzmq' 'qt5-base' 'qt5-svg' 'qt5-webkit')
optdepends=('faac: for exporting audio using AAC')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenShot/openshot-qt/archive/v$pkgver.tar.gz"
        "${pkgname}-hicolor-icons.patch::https://github.com/OpenShot/openshot-qt/pull/2837.patch")
sha512sums=('efa71f97a83b89e691b7dab09288ba7d3e91eb25119669fa8f6e28becb8d4cb3e60a923f936ee4ff9a593d016fe3a6b0348153cff937ab7d21a5517de5dfa10c'
            '97ebbe5d289d89c5da307076d7a3a0f517f57e8fd8123a920d031585bd48e1ccdcaa9f8180e976dd602e562d0bd2373e4bf5059dc72cf04b61b462b72a8bba1f')

prepare() {
  mv -v "${pkgname}-qt-${pkgver}" "${pkgname}-${pkgver}"
  cd "${pkgname}-${pkgver}"
  # Fix hicolor icon paths
  patch -Np1 -i "../${pkgname}-hicolor-icons.patch"
}

build() {
  cd "${pkgname}-${pkgver}"
  python setup.py build
}

package() {
  cd "${pkgname}-${pkgver}"
  python setup.py install --skip-build \
                          --optimize=1 \
                          --prefix=/usr \
                          --root="${pkgdir}"
  install -vDm 644 {AUTHORS,{CONTRIBUTING,README}.md} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
Code:
>>> import classes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'classes
I looked at all of those python depends. I don't see classes.
Code:
curl -LI https://github.com/OpenShot/openshot-qt/archive/v2.4.4.tar.gz
HTTP/1.1 302 Found
Server: GitHub.com
Date: Wed, 29 Jan 2020 19:36:54 GMT
...
Content-Type: application/x-gzip
Content-Disposition: attachment; filename=openshot-qt-2.4.4.tar.gz
X-Geo-Block-List:
Date: Wed, 29 Jan 2020 19:36:54 GMT
X-Varnish: 312317020
Age: 0
Via: 1.1 varnish-v4
Accept-Ranges: bytes
X-GitHub-Request-Id: 9CEA:1E5C:3755D:6998C:5E31DED6
Good luck. That's about all I have short of trying to build it.
 
Old 01-29-2020, 02:33 PM   #4
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
i'm on current last updated to kernel 5.4.12 see image to see what i get for openshot

i went for cinelerra - compare the deps

its not quite true that slackware doesn't do tracking of deps. By "diligent" use of slpkg , i've both installed what I want' kept what I want by blacklisting and still managed to upgrade from 4.9.75 to 5.4.12 using slackpkg
Attached Thumbnails
Click image for larger version

Name:	openshot.jpg
Views:	26
Size:	114.8 KB
ID:	32416   Click image for larger version

Name:	cinelerra.jpg
Views:	16
Size:	63.8 KB
ID:	32417  
 
Old 01-30-2020, 05:43 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
@tekk & captain sensible: Thank you both for your replies.

@captain sensible: Python modules are a world apart from normal deps, because ldd doesn't reveal them. I'm glad you managed your kernel update, but kernels aren't really the worry. I've updated major kernel changes, and the only one I had real hassle with was kernel 2.x.x --> 3.x.x.

@tekk. I think we have different openshot versions. You seem to have 2.4.4, I have 2.4.4 in an AppImage, but ponce had these 20191111 packages up and I'm trying them. That version wants classes.

I went back to my error, specifically, this line
Code:
ImportError: cannot import name 'info' from 'classes' (/usr/lib64/python3.8/site-packages/classes/__init__.py)
. Now classes is installed in python3.8, so I grokked _init__.py. I found it wanting. This is __init__.py
Code:
bash-5.0$ cat /usr/lib64/python3.8/site-packages/classes/__init__.py
# -*- coding: utf-8 -*-

"""
Here we define the public API of our module.

Make sure to mark all imports as ``as`` imports,
so mypy's ``implicit_reexport`` rule will be happy.
"""

from classes.typeclass import typeclass as typeclass
bash-5.0$
The only thing it apparently does is load typeclass.py from the same directory. Do I read that right? Anyhow, from the links @tekk provided, it seems there's no _init__py on github. So I removed classes, and hey presto, it picked up on the openshot-qt/classes package. I don't know what else is broken, but we'll cross that bridge when we come to it. That throws a different error:
Code:
Module: _openshot

Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/openshot_qt/classes/app.py", line 73, in __init__
    from classes import settings, project_data, updates, language, ui_util, logger_libopenshot
  File "/usr/lib64/python3.8/site-packages/openshot_qt/classes/logger_libopenshot.py", line 31, in <module>
    import openshot
  File "/usr/lib64/python3.8/site-packages/openshot.py", line 15, in <module>
    import _openshot
ImportError: libzmq.so.5: cannot open shared object file: No such file or directory
IIRC, zeromq was one of the things I built back when I tried compiling openshot. It sounds like a likely place for libzmq. I won't mark this solved, but I'll go hunting

Last edited by business_kid; 01-30-2020 at 05:45 AM.
 
1 members found this post helpful.
Old 01-30-2020, 08:00 AM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,132
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
https://github.com/OpenShot/openshot...ee/develop/src

The original error
Code:
File "/usr/lib64/python3.8/site-packages/openshot_qt/launch.py", line 47, in <module>
    from classes import info
ImportError: cannot import name 'info' from 'classes' (/usr/lib64/python3.8/site-packages/classes/__init__.py)
From:
https://raw.githubusercontent.com/Op.../src/launch.py line 47
Code:
try:
    from classes import info
This is what it is looking for and not finding:
https://raw.githubusercontent.com/Op...lasses/info.py

This is the classes it's looking for:
https://github.com/OpenShot/openshot...op/src/classes

This is __init__.py for this python project
https://raw.githubusercontent.com/Op...rc/__init__.py
 
Old 01-30-2020, 08:17 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
In my last post I neglected to mention that I had uninstalled classes with pip3 more than once, so I upgraded openshot with itself just to be sure.

I was right - zeromq it was. Now I get this:
Code:
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/openshot_qt/classes/app.py", line 73, in __init__
    from classes import settings, project_data, updates, language, ui_util, logger_libopenshot
  File "/usr/lib64/python3.8/site-packages/openshot_qt/classes/logger_libopenshot.py", line 31, in <module>
    import openshot
  File "/usr/lib64/python3.8/site-packages/openshot.py", line 15, in <module>
    import _openshot
ImportError: /usr/lib64/libQt5OpenGL.so.5: undefined symbol: _ZN7QBezier10fromPointsERK7QPointFS2_S2_S2_, version Qt_5_PRIVATE_API
I wonder how many of these will there be? Let's hope ponce has that too.
 
Old 01-30-2020, 08:26 AM   #8
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,132
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
That PKGBUILD has all the info that you need to build it from source. You may have to modify the $paths to fit slack.

You need all of the depends installed
Code:
'ffmpeg' 'python-mlt' 'python-pyqt5' 'python-requests' 'libopenshot'
'libopenshot-audio' 'python-pyzmq' 'qt5-base' 'qt5-svg' 'qt5-webkit'
optional
Code:
'faac: for exporting audio using AAC'
You need python setup tools
Code:
makedepends=('python-setuptools')
The source
https://github.com/OpenShot/openshot.../v2.4.4.tar.gz

Patch for icons
https://github.com/OpenShot/openshot-qt/pull/2837.patch

Checksums for those files
Code:
efa71f97a83b89e691b7dab09288ba7d3e91eb25119669fa8f6e28becb8d4cb3e60a923f936ee4ff9a593d016fe3a6b0348153cff937ab7d21a5517de5dfa10c

97ebbe5d289d89c5da307076d7a3a0f517f57e8fd8123a920d031585bd48e1ccdcaa9f8180e976dd602e562d0bd2373e4bf5059dc72cf04b61b462b72a8bba1f
Apply patch
Code:
patch -Np1 -i "../${pkgname}-hicolor-icons.patch"
Build it
Code:
python setup.py build
Install it(You'll need to modify this for Slack, paths, Install it instead of making a package...)
Code:
python setup.py install --skip-build --optimize=1 --prefix=/usr --root="${pkgdir}"
  
install -vDm 644 {AUTHORS,{CONTRIBUTING,README}.md} -t "${pkgdir}/usr/share/doc/${pkgname}"
 
Old 01-30-2020, 08:55 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I neglected to mention in my long post that as I had removed the classes module with pip3 more than once, I reinstalled openshot

As for the deps, there's more deps than that list. It needs zeromq (python3-zmq doesn't cut it afaik; I've exploded them both)


libOpengl.so.5 is in the main qt5 package. Now ponce only has qt-5.9.9, but alien has 5.13.2, which is installed. So I'll have to hunt a later one, or stay on my AppImage, which is 2.4.4. I refuse to compile things, not because I can't, but because I won't. The openshot guys use the hardest to get latest versions of everything and seem to include a couple that haven't been written yet!

So if there's a later Qt5 package, I'll use it. If there isn't, although qt5 is easy enough to compile, I'll stay on my AppImage. Thanks tekk for your help, but I'm not in the mood for suffering. I've certainly ran aground before on openshot before looking for software that wasn't up there.
 
Old 01-31-2020, 04:28 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Final word on this: The latest qt package I can find is 5.13.2, from alien's repo. It's installed.
I also have qt-4.8.7; I have a separate thread asking if I still need this(just in case it's fouling things). My openshot appimage is dated July 2019 and is version 2.4.4. It can stay.
 
Old 01-30-2021, 07:19 AM   #11
Indus.Lord
LQ Newbie
 
Registered: Oct 2020
Distribution: slackware-14.2
Posts: 5

Rep: Reputation: Disabled
Generate dependency graph

Quote:
Originally Posted by captain_sensible View Post
i'm on current last updated to kernel 5.4.12 see image to see what i get for openshot

i went for cinelerra - compare the deps

its not quite true that slackware doesn't do tracking of deps. By "diligent" use of slpkg , i've both installed what I want' kept what I want by blacklisting and still managed to upgrade from 4.9.75 to 5.4.12 using slackpkg
Hello captain_sensible,

Would you kind enough detail how you creating the dependency graph thumbnails. ? Looks a useful feature to know.

Thanks
 
Old 01-30-2021, 01:10 PM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,248

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Hello, Indus, & welcome to LQ.

That was a lively thread, but it's a year old at this stage, so I wouldn't post there.

LQ rules suggest that if you have a problem, you post your own thread. It's often faster actually to search the threads on the site. Have a look at this: How_To_Ask_a_Question
 
Old 01-31-2021, 02:15 AM   #13
Indus.Lord
LQ Newbie
 
Registered: Oct 2020
Distribution: slackware-14.2
Posts: 5

Rep: Reputation: Disabled
Thank you

Quote:
Originally Posted by business_kid View Post
Hello, Indus, & welcome to LQ.

That was a lively thread, but it's a year old at this stage, so I wouldn't post there.

LQ rules suggest that if you have a problem, you post your own thread. It's often faster actually to search the threads on the site. Have a look at this: How_To_Ask_a_Question
Yes I should have started a new thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Learning Python, how should I implement the following problem in Python 3 code? rblampain Programming 8 05-29-2016 10:53 AM
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM
Try Python, O'reilly Learning Python haknot Programming 5 02-15-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration