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, 03:13 PM   #1
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
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 04:18 PM. Reason: adding slackware version
 
Old 01-03-2020, 04:16 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,095

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
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, 04:35 PM   #3
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
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, 05:04 PM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,095

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
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-03-2020, 11:17 PM   #5
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
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-03-2020, 11:19 PM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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, 04:54 AM   #7
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,085

Rep: Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262
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, 05:19 PM   #8
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
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 03:03 AM
[SOLVED] KDE launch display No Signal (after wine Steam Deus Ex launch crash) KGHN Slackware 5 01-21-2015 10:38 PM
[SOLVED] Zorin dock launch (ie quick launch) instalation and use provobis Linux - Newbie 4 01-16-2015 07:25 PM
Unable to launch application from workstation but able to launch from vnc chaitanya1982 Linux - Desktop 2 04-30-2010 03:52 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM

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

All times are GMT -5. The time now is 02:43 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
Open Source Consulting | Domain Registration