amanusk / s-tui

Terminal-based CPU stress and monitoring utility
https://amanusk.github.io/s-tui/
GNU General Public License v2.0
4.06k stars 140 forks source link

Crash on first run on Ubuntu 18.04 install from apt, missing distutils dependency #71

Closed mikehardy closed 5 years ago

mikehardy commented 6 years ago

Step 1: Describe your environment

Step 2: Describe the problem:

Observed Results:

crash with Python traceback indicating it couldn't find distutils

Debug Results, output of s-tui -d created in a file _s-tui.log:

  File "/usr/bin/s-tui", line 9, in <module>
    load_entry_point('s-tui==0.7.6', 'console_scripts', 's-tui')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/s_tui/s_tui.py", line 43, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils.spawn'

Step 3: Reproduce the problem:

Steps to reproduce:

  1. Install using PPA method on Ubuntu 18.04
  2. run s-tui
  3. see the callback

I think the package just needs a dependency on python3-distuils - that solved it for me:

sudo apt-get install python3-distutils

Worked great after that, thank you!, and easily helps visualize why I need to re-paste my factory-fresh Dell laptop CPU :-)

mikehardy commented 6 years ago

Note that this may have been a move from package name "python3-distutils-extra" (pre-18.04) to "python3-distutils" (in 18.04). It appears that 18.04 still has python3-distutils-extra, which depends on python3-distutils, so adding a python3-distutils-extra dependency may be the simplest fix that covers people from 14.04LTS and up

You can see the 18.04 package here as well as the related previous-release package hits below it (and if you follow them you see a depends on distutils for 18.04, while that package doesn't seem to exist in previous distributions but the -extra package provides the Python code I believe) https://packages.ubuntu.com/search?keywords=python3-distutils

amanusk commented 6 years ago

Thanks for the detailed issue report. I tried to install from PPA on 18.04 running off a live USB and was unable to recreate the issue. Was this a minimal install / regular install?

mikehardy commented 6 years ago

Hmm - this wasn't minimal but I'm trying to remember the options I chose on install. I still have the installation logs in /var/log/installer but I'm not sure how to get whatever information would help nail this down. If you can think of anything I could pull out of there let me know, otherwise I don't what to say except I took the ubuntu desktop iso, used etcher to put it on a USB key, then ran the installer with defaults.

amanusk commented 6 years ago

@mikehardy, you were right. Look like it was not an issue with 18.04 (which is what I used to install from PPA), but is an issue now with 18.04.1

I would like to keep the dependencies to a minimum, so I think I'll try to remove the use of distutils.spawn.

amanusk commented 5 years ago

Dependency on distutils removed. Closing.

shotor commented 4 years ago

still getting this issue, am I doing something wrong?

amanusk commented 4 years ago

@shotor, how are you trying to install?

shotor commented 4 years ago

Yes, well install succeeds. I get the same error message when trying to run s-tui

On Tue, 10 Mar 2020, 06:30 Alex Manuskin, notifications@github.com wrote:

@shotor https://github.com/shotor, are you trying to install?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/amanusk/s-tui/issues/71?email_source=notifications&email_token=ABO6JSZ3HCJAQO65IWVFIDLRGXF7JA5CNFSM4FPBCSN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOKCG2Q#issuecomment-596910954, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABO6JS2IF7U7I54TVBTEXKTRGXF7JANCNFSM4FPBCSNQ .

amanusk commented 4 years ago

Ok, but what did you use to install pip/apt? which OS?

shotor commented 4 years ago

my bad, I'm using apt and ubuntu 18.04 I installed through the PPA

❯ s-tui --version
s-tui 0.7.6 - (C) 2017-2018 Alex Manuskin, Gil Tsuker
    Released under GNU GPLv2

I have a feeling it's not grabbing the correct version, but don't know how to debug