Closed v6 closed 4 years ago
Thanks for the issue,
It seems the problem is with the installation of psutil
Could you please try to install only psutil
with pip and see if the issue persists?
Also, you should be able to install s-tui on 18.04
with simply sudo apt install s-tui
// , @amanusk I'll give that a try. I'm hoping that this will help me find out what's wrong with the Thinkpad's power management.
@v6 sorry for the mix-up, installation with apt without the PPA is only available from 18.10
and onward.
Also, you should checkout https://github.com/erpalma/throttled for mitigating power management issues.
I had this same issue on centos7 and it was due to missing python-devel headers. Resolving it by installing python-devel with yum
Thanks for the issue, It seems the problem is with the installation of
psutil
Could you please try to install onlypsutil
with pip and see if the issue persists? Also, you should be able to install s-tui on18.04
with simplysudo apt install s-tui
Hello, I too have a similar issue as the OP. I've tried as you've suggested;
$ pip install psutil Collecting psutil Installing collected packages: psutil Successfully installed psutil-5.6.3
Next I did;
$ sudo apt install s-tui Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package s-tui
Shouldn't the s-tui package be there? What would cause it to not be there?
I've also tried;
$ pip install lxml Collecting lxml Downloading https://files.pythonhosted.org/packages/af/31/47cce58942bbf4b8f1c975ec2d1ab52141f7b7cf8cdecb58f25546d2c4fd/lxml-4.3.4-cp27-cp27mu-manylinux1_x86_64.whl (5.6MB) 100% |████████████████████████████████| 5.6MB 227kB/s Installing collected packages: lxml Successfully installed lxml-4.3.4
... in order to update the headers...
I'm on Linux MINT 19.1. Thanks for this app...hope to get it working soon. :)
Hi @iunlock,
Unfortunately it seems s-tu is not yet available from mint repositories.
You can install it with pip
, just like you installed psutil.
If you want to try out the beta version, install with
pip install s-tui==1.0.0b1
Please report if this works out for you
Hi @iunlock, Unfortunately it seems s-tu is not yet available from mint repositories. You can install it with
pip
, just like you installed psutil. If you want to try out the beta version, install withpip install s-tui==1.0.0b1
Please report if this works out for you
Thanks for the quite reply Dev. :)
$ pip install s-tui==1.0.0b1 Collecting s-tui==1.0.0b1 Downloading https://files.pythonhosted.org/packages/6d/a0/fb3676a2cb39b85722d85976cdd7a10881fff9a75978a97448662c42bbe6/s-tui-1.0.0b1.tar.gz Collecting urwid>=2.0.1 (from s-tui==1.0.0b1) Collecting psutil>=5.6.0 (from s-tui==1.0.0b1) Building wheels for collected packages: s-tui Running setup.py bdist_wheel for s-tui ... done Stored in directory: /home/lg/.cache/pip/wheels/b6/83/43/5b56bb0373c85a35bd3b56f9071519f732b4b90c5c7ff2cb4f Successfully built s-tui Installing collected packages: urwid, psutil, s-tui Successfully installed psutil-5.6.3 s-tui-1.0.0b1 urwid-2.0.1
...
$ s-tui Traceback (most recent call last): 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'
I assume now I would have to install the distutils.spawn?
It seems you already have an older version of s-tui installed with apt
(0.7.6)
You should probably uninstall it first to avoid conflicts (sudo apt remove --purge s-tui
).
pip executables are usually installed in ~/.local/bin/
distutils.spawn should not be a dependency in the new version
When running that command, this is what it outputs:
$ sudo apt remove --purge s-tui Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package s-tui
This is one of the things that has been throwing me off. The system says that it's there, but it's not there. I'm actually very surprised myself to be running into these issues lol. It sure does have me scratching my head.
Would you be so kind to provide directions from A to Z in order of the commands to try? That would be great since I'm majorly OCD. It may be rhetorical, but just in case... I'd like to start from scratch.
Hmm.. this is indeed a bit frustrating. The reason is basically that there are several ways to install python packages. Ubuntu/mint has there own packages for psutil for example (python-psutil), but these are often outdated, so pip is an option as well.
Here are the steps I would try:
sudo apt remove --purge s-tui
sudo apt remove --purge python-s-tui
sudo apt remove --purge python3-s-tui
sudo pip uninstall s-tui
sudo pip3 uninstall s-tui
pip uninstall s-tui
pip3 uninstall s-tui
Then install with pip
Thanks. Here are the results in order and what it's outputting:
$ sudo apt remove --purge s-tui [sudo] password for xx: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package s-tui
$ sudo apt remove --purge python-s-tui Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python-s-tui
$ sudo apt remove --purge python3-s-tui Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: python3-urwid Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: python3-s-tui* 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded. After this operation, 155 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 320609 files and directories currently installed.) Removing python3-s-tui (0.7.6-1) ...
$ sudo pip uninstall s-tui The directory '/home/xx/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Uninstalling s-tui-1.0.0b1: /home/xx/.local/bin/s-tui /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/INSTALLER /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/METADATA /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/RECORD /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/WHEEL /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/entry_points.txt /home/xx/.local/lib/python2.7/site-packages/s_tui-1.0.0b1.dist-info/top_level.txt /home/xx/.local/lib/python2.7/site-packages/s_tui/__init__.py /home/xx/.local/lib/python2.7/site-packages/s_tui/__init__.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/about_menu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/about_menu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/help_menu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/help_menu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/helper_functions.py /home/xx/.local/lib/python2.7/site-packages/s_tui/helper_functions.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/s_tui.py /home/xx/.local/lib/python2.7/site-packages/s_tui/s_tui.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sensors_menu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sensors_menu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/__init__.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/__init__.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/fan_source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/fan_source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/freq_source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/freq_source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/hook.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/hook.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/hook_script.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/hook_script.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/rapl_power_source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/rapl_power_source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/rapl_read.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/rapl_read.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/script_hook_loader.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/script_hook_loader.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/temp_source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/temp_source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/util_source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sources/util_source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/stress_menu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/stress_menu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/__init__.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/__init__.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/bar_graph_vector.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/bar_graph_vector.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/complex_bar_graph.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/complex_bar_graph.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/summary_text_list.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/summary_text_list.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/ui_elements.py /home/xx/.local/lib/python2.7/site-packages/s_tui/sturwid/ui_elements.pyc Proceed (y/n)? y Successfully uninstalled s-tui-1.0.0b1
$ sudo pip3 uninstall s-tui sudo: pip3: command not found
$ pip uninstall s-tui Uninstalling s-tui-0.8.3: /home/xx/.local/lib/python2.7/site-packages/s_tui-0.8.3-py2.7.egg-info /home/xx/.local/lib/python2.7/site-packages/s_tui/AboutMenu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/AboutMenu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/ComplexBarGraphs.py /home/xx/.local/lib/python2.7/site-packages/s_tui/ComplexBarGraphs.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/GlobalData.py /home/xx/.local/lib/python2.7/site-packages/s_tui/GlobalData.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/HelpMenu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/HelpMenu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/HelperFunctions.py /home/xx/.local/lib/python2.7/site-packages/s_tui/HelperFunctions.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/FanSource.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/FanSource.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/FreqSource.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/FreqSource.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/Hook.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/Hook.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/RaplPowerSource.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/RaplPowerSource.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/ScriptHook.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/ScriptHook.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/ScriptHookLoader.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/ScriptHookLoader.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/Source.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/Source.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/TemperatureSource.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/TemperatureSource.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/UtilSource.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/UtilSource.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/__init__.py /home/xx/.local/lib/python2.7/site-packages/s_tui/Sources/__init__.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/StressMenu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/StressMenu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/StuiBarGraph.py /home/xx/.local/lib/python2.7/site-packages/s_tui/StuiBarGraph.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/SummaryTextList.py /home/xx/.local/lib/python2.7/site-packages/s_tui/SummaryTextList.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/TempSensorsMenu.py /home/xx/.local/lib/python2.7/site-packages/s_tui/TempSensorsMenu.pyc /home/xx/.local/lib/python2.7/site-packages/s_tui/UiElements.py /home/xx/.local/lib/python2.7/site-packages/s_tui/UiElements.pyc Proceed (y/n)? y Successfully uninstalled s-tui-0.8.3
$ pip3 uninstall s-tui Command pip3 not found, but can be installed with: sudo apt install python3-pip
I hope the data above helps narrow down the issue.
I've refrained from installing with pip due to some of the outputs above and wanted to wait to hear back from you before I proceeded.
Thanks for all your help with this.
I didn't know which package manager you used for the old installation, so I listed them all.
It was successfully uninstalled in this stage :)
sudo apt remove --purge python3-s-tui Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: python3-urwid Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: python3-s-tui* 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded. After this operation, 155 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 320609 files and directories currently installed.) Removing python3-s-tui (0.7.6-1) ...
Package management with python is a bit of a mess, and the whole python2/3 mess does not help.
Some solutions make dependencies easier to deal with by using virtual environments per package, for example pipsi and its successor. These are suitable for installing executables such as s-tui
and are usually recommended.
You should use whatever method is most comfortable for you.
To install s-tui with pip run:
pip install s-tui==1.0.0b1
Your distro probably has some version of pip built in (find out with which pip
)
@iunlock, did it work for you?
// ,
Step 1: Describe your environment
pip install --user s-tui
Step 2: Describe the problem:
Installation requires
sudo
Observed Results:
Debug Results, output of
s-tui -d
created in a file_s-tui.log
:Step 3: Reproduce the problem:
Steps to reproduce:
s-tui
as a non-root user.