LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-03-2020, 04:13 PM   #1
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 602

Rep: Reputation: 196Reputation: 196
hp-toolbox launch error - python 3.8 issue?


The HP Device Manager is not launching from my panel widget nor from the cli. The error at the end is: ModuleNotFoundError: No module named 'distro'

I poked around in the /usr/lib64/python3.8/site-packages/pip/_vendor directory and didn't see the usual *.pyc files like are in the /usr/lib64/python2.7/site-packages/pip/_vendor directory.

I'm wondering if python 3.8 is the cause or do I need to look elsewhere?

Code:
me@desktop:~$ hp-toolbox
/usr/share/hplip/base/utils.py:2061: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if weburl is "" or weburl is None:

HP Linux Imaging and Printing System (ver. 3.19.12)
HP Device Manager ver. 15.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

/usr/share/hplip/installer/core_install.py:2074: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if home_dir is "":
/usr/share/hplip/ui4/devmgr5_base.py:287: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":
/usr/share/hplip/ui4/devmgr5_base.py:409: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.latest_available_version is not "":
warning: Reportlab not installed. Fax coverpages disabled.
warning: Please install version 2.0+ of Reportlab for coverpage support.
Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 280, in <module>
    toolbox = ui.DevMgr5(__version__, device_uri,  None)
  File "/usr/share/hplip/ui4/devmgr5.py", line 189, in __init__
    core =  CoreInstall(MODE_CHECK)
  File "/usr/share/hplip/installer/core_install.py", line 240, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 118, in __init__
    self.__readAuthType()  # self.__authType
  File "/usr/share/hplip/base/password.py", line 140, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/usr/share/hplip/base/password.py", line 87, in get_distro_name
    import distro
ModuleNotFoundError: No module named 'distro'
me@desktop:~$
EDIT: I'm running slackware64-current (with ktown)

Last edited by Chuck56; 01-03-2020 at 05:18 PM. Reason: adding slackware version
 
Old 01-03-2020, 05:16 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,248

Rep: Reputation: Disabled
I suppose your system is a slackware64-current: here I got the distro module as part of the python-pip package, both the 2.7 and 3.8 versions
Code:
$ grep distro /var/log/packages/* | grep python
/var/log/packages/python-pip-19.3.1-x86_64-2:usr/lib64/python2.7/site-packages/pip/_vendor/distro.py
/var/log/packages/python-pip-19.3.1-x86_64-2:usr/lib64/python2.7/site-packages/pip/_vendor/distro.pyc
/var/log/packages/python-pip-19.3.1-x86_64-2:usr/lib64/python3.8/site-packages/pip/_vendor/__pycache__/distro.cpython-38.pyc
/var/log/packages/python-pip-19.3.1-x86_64-2:usr/lib64/python3.8/site-packages/pip/_vendor/distro.py
 
Old 01-03-2020, 05:35 PM   #3
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 602

Original Poster
Rep: Reputation: 196Reputation: 196
I have the python-pip package installed with all its files. I see from you post that your system doesn't have a 3.8 distro.pyc either. Then I wonder what is going on with hplip on my system?
 
Old 01-03-2020, 06:04 PM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,248

Rep: Reputation: Disabled
well, looking better at it, it seems an additional python-distro package is needed: try this (you have to build yourself one using a SlackBuild), the explanation should be in the slack-desc

http://ponce.cc/slackware/testing/python-distro/
 
3 members found this post helpful.
Old 01-04-2020, 12:17 AM   #5
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 602

Original Poster
Rep: Reputation: 196Reputation: 196
Wow! That worked like a charm! Thanks for the SlackBuild ponce. The HP Device Manager is back in action on my system. I'll mark this thread as solved.
 
1 members found this post helpful.
Old 01-04-2020, 12:19 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,457

Rep: Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051
That fixes it here; I guess python-distro will need to be added to Slackware -current...
 
2 members found this post helpful.
Old 01-04-2020, 05:54 AM   #7
cwizardone
LQ Guru
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib."
Posts: 5,315
Blog Entries: 1

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
Quote:
Originally Posted by ponce View Post
well, looking better at it, it seems an additional python-distro package is needed: try this (you have to build yourself one using a SlackBuild), the explanation should be in the slack-desc

http://ponce.cc/slackware/testing/python-distro/
That works!
Many Thanks, Ponce!
 
Old 01-04-2020, 06:19 PM   #8
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,353

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
python-distro was added today for current slackware.
 
1 members found this post helpful.
  


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
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 04:03 AM
[SOLVED] KDE launch display No Signal (after wine Steam Deus Ex launch crash) KGHN Slackware 5 01-21-2015 11:38 PM
[SOLVED] Zorin dock launch (ie quick launch) instalation and use provobis Linux - Newbie 4 01-16-2015 08:25 PM
Unable to launch application from workstation but able to launch from vnc chaitanya1982 Linux - Desktop 2 04-30-2010 04:52 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 09:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration