I use KDE Plasma, and I use goes16-background as a wallpaper.
“goes16-background is a Python 3 script that fetches near-realtime (~15 minutes delayed) image of Earth as its taken by GOES-16 satellite and sets it as your desktop background.”
goes16-background starts and works smoothly with python 3.11.2 (for example) and cannot work at all with python versions 3.11.9-3.12.xx.
Manjaro uses python 3.12.xx now, so I cannot use the script.
I try to install python 3.11.2 and create a virtual environment for it, activate it, but when I start goes16-background, it fails and shows that it still uses python 3.12.xx.
I don’t know what I’m doing wrong. Can anybody help me. Is it possible at all to install and run goes16-background within python 3.11.2 virtual environment on Manjaro? What is the right way to make and use environment for python 3.11.2? I looked through a number of articles on a variety of websites, but got no meaningful explanation.
The script is old and it seems the creator is reluctant to update it. I sent him a number of letters, but he did not react. Nevertheless, the idea is beautiful and I like the real Earth in the background.
I cannot inform you about the error, because I’m reinstalling everything on that PC now. But the error is long. It mentions python 3.12 many times, line number so and so , line number so and so, and bla, bla, bla.
I’m really a novice, so my knowledge of python virtual environment is poor. I can install python311 via pyenv, I can activate env, but I have no idea how to run installation of the script (sudo python3 setup.py install) under venv and how to run the goes16-background. I just have no idea how you could start the script with python -m goes16background command. Shall I just install the script under 3.12.5. version and start it with python -m goes16background command?
You either use pyenv to install Python 3.11 or the AUR package. Doesn’t matter, maybe the AUR is simpler to manage.
Then, you have python3.11 on your command line: use it to create a virtualenv: python3.11 -m venv ~/.venvs/goes16
To install the package, you run: source activate ~/.venvs/goes16/activate
(your terminal should now show goes16 somewhere in the prompt).
Then, you install the package: pip install -e .
(It may complain about missing packages, you have to install them on your own, because as you already noticed, the original developer is not supporting the package anymore.)
After you installed it, the package installed a runnable file in ~/.venvs/goes16/bin/goes16-background which you can use in the systemd service file.
Does not run or i am doing something wrong (installed with pipx install liewa, python3.12 - the system one)
[teo@teo-lenovo-v15 ~]$ liewa-cli -c /home/teo/test1.yml -o /home/teo
Traceback (most recent call last):
File "/home/teo/.local/bin/liewa-cli", line 6, in <module>
main()
File "/home/teo/.local/share/pipx/venvs/liewa/lib/python3.12/site-packages/liewa/liewa_cli/main.py", line 46, in main
img = parse_image(args.config)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teo/.local/share/pipx/venvs/liewa/lib/python3.12/site-packages/liewa/liewa_cli/image_parser.py", line 52, in parse_image
raw_img = load_geostationary(value,satellite)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teo/.local/share/pipx/venvs/liewa/lib/python3.12/site-packages/liewa/liewa_cli/full_disks.py", line 66, in load_geostationary
base_url = build_url(args,satellite,scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teo/.local/share/pipx/venvs/liewa/lib/python3.12/site-packages/liewa/liewa_cli/full_disks.py", line 48, in build_url
time_code, date = get_time_code(satellite)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teo/.local/share/pipx/venvs/liewa/lib/python3.12/site-packages/liewa/liewa_cli/full_disks.py", line 24, in get_time_code
latest = data["timestamps_int"][0]
~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
Found another similar project, i guess i will try this next
Hi again!
I installed python 3.11.2 via pyenv.
It is located in the following folder:
~./pyenv/versions/3.11.2
python3.11 executable file is located in the folder
~./pyenv/versions/3.11.2/bin
to create a virtualenv I open terminal in the folder
~./pyenv/versions/3.11.2/bin (am I right?)
so the command line looks like follows:
Thanks. I did everything and got the following error:
~ goes16-background
goes16-background 1.2.0
Updating…
Latest version: 2024/09/03 16:30:20 UTC.
Downloading tiles…
Downloading tiles: 1/4 completed…
Downloading tiles: 2/4 completed…
Downloading tiles: 3/4 completed…
Downloading tiles: completed.
Saving to ‘/home/alex/.cache/goes16background/goes16-20240903T163020.png’…
grep: /proc//environ: Нет такого файла или каталога
Could NOT retrieve env. var. GNOME_DESKTOP_SESSION_ID
Plasma version 'plasmashell 6.0.5
'.
Exception in thread goes16-background-main-thread:
Traceback (most recent call last):
File “/usr/lib/python3.12/threading.py”, line 1075, in _bootstrap_inner
self.run()
File “/usr/lib/python3.12/threading.py”, line 1012, in run
self._target(*self._args, **self._kwargs)
File “/usr/lib/python3.12/site-packages/goes16background/main.py”, line 166, in thread_main
if not set_background(output_file):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/site-packages/goes16background/utils.py”, line 64, in set_background
subprocess.check_output([“qdbus”, “org.kde.plasmashell”, “/PlasmaShell”,
File “/usr/lib/python3.12/subprocess.py”, line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/subprocess.py”, line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/subprocess.py”, line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.12/subprocess.py”, line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘qdbus’
You have tagged your topic with Plasma and from the message your are on Plasma 6.0.5
I am on Plasma 6.1.4 - and what I described works
I had to troubleshoot some python dependencies that is all.
qdbus is a core component for Plasma - so there must be something else with your system.
I will do another test using a pristine system installed from Manjaro Plasma 24.0.7 ISO, which - assuming your system is up-to-date - will match yours on the basic level.
//EDIT
This is an example of why custom applications and packages are unsupported on stable branch.
I must emphasize stable branch is largely incompatible with custom packages, of course exceptions exist - printer drivers comes to mind.
In this case the issue is caused by qdbus binary is named qdbus6 - my guess is that Plasma 6.0.x is partly a transission package - a step on the road to a full transission to qt6 toolkit.
With Plasma 6.1.4 - which I use on my production systems - the binary is qdbus as the package expect.
The solution for your usecase is to install the package qt5-tools which provides the qdbus binary for Plasma 5.x - this was already hinted by @mithrial - although it was assumed it should be qt6-tools.
Once again, just to give some more info of the workaround i found. The last site/binary i posted works. All the other python projects did not work. I think at some point the site/path of the images of the website of the Colorado University, which they all parse, changed, so that most scripts break on “file not found”.
So, that said, the biggest challenge was to find good settings for Europe. After that it was easy. A simple script, replacing the image. For now manually, because i am still testing (and next week i will be on metered connection and this pulls 20 meg every time), but it can be made a service, or loop every hour.