avatar_Thats_me

Wie handhabt ihr backups? Empfehlungen?

Begonnen von Thats_me, 15. Mai 2022, 16:17:32

« vorheriges - nächstes »

0 Mitglieder und 1 Gast betrachten dieses Thema.

gosia

Hallo Thats_me,
zur Begriffsklärung von Python:
shim:
Shims sind Funktionen, die den eingegebenen Befehl an pyenv weitergeben. Wenn pyenv installiert ist und Du gibst das Kommando
pip install foo

ein, wird der PATH nach der ausführbaren Datei pip durchsucht und die erste dort gefundene passende Datei namens pip gestartet.

pyenv:
pyenv ist ein Tool, mit dem man verschiedene Python-Versionen auf einer Maschine betreiben kann. Dazu wird eine Liste (ein Verzeichnis) mit den Orten der entsprechen shims erstellt, z.B. wo liegt pip für Python 2.7 und wo pip für Python 3.5

Api
das sind ganz allgemein Schnittstellen, mit denen viele Daten per Programm/Skript angefordert werden können. Ein Beispiel: Du kannst die Homepage deiner Stdtbibliothek aufrufen, um dort von Hand per Eingabe alle vorhandenen Krimis deines Lieblingsschriftstellers zu sehen. Du kannst das aber auch per API automatisieren und ein Skript diese Aufgabe erledigen zu lassen. Und ja, Du kannst auch automatisierte Google-Abfragen per API durchführen, aber das ist ja kein "muss", sondern ein "kann". Deshalb sind APIs nicht per se böse, sondern eher nützlich.
so ganz grob die Funktionen, ohne ins Detail gehen zu müssen.
pip hat ja Daemon schon hervorragend erklärt.

Ob es an deiner Python-Version liegt, kann sein, kann nicht sein. Poste doch mal deine Version:
python -V

(grosses V)
Dann können wir das Problem besser analysieren. Ich habe übrigens Python 3.10.4
Aber Du kannst auch auf Nummer sicher gehen und vorher ein Python-Update machen und anschliessend nochmals probieren:

python -m ensurepip --upgrade
pip3 install pkgconfig ; pip3 install "borgbackup==1.2.0"

Wenn das immer noch nicht hilft und Du noch Lust hast, dann poste bitte mal die Ausgabe von
pip3 show pip borgbackup pkgconfig
pacman -Ss pkgconfig

wir können uns aber auch nach anderen Backupprogrammen umsehen. Es gibt noch mehr, die auf rsync basieren.

viele Grüsse gosia

PS. Vielen Dank für die netten Wünsche. Noch ist alles ruhig, nur ein fernes Grollen ist zu vernehmen, die Bäume fangen an zu schwanken und der Himmel wird langsam immer grauer.

Thats_me

#16
Liebe gosia,

Danke! Version ist ebenfalls Python 3.10.4

Hier mal die Infos

xmg:[me]:~$ python -m ensurepip --upgrade
Defaulting to user installation because normal site-packages is not writeable
Looking in links: /tmp/tmp3u9e68k8
Requirement already satisfied: setuptools in /usr/lib/python3.10/site-packages (60.6.0)
Requirement already satisfied: pip in /usr/lib/python3.10/site-packages (21.0)
Processing /tmp/tmp3u9e68k8/pip-22.0.4-py3-none-any.whl
Installing collected packages: pip
  WARNING: The scripts pip3 and pip3.10 are installed in '/home/me/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.0.4
xmg:[me]:~$ pip3 install pkgconfig ; pip3 install "borgbackup==1.2.0"
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pkgconfig in ./.local/lib/python3.10/site-packages (1.5.5)
Defaulting to user installation because normal site-packages is not writeable
Collecting borgbackup==1.2.0
  Using cached borgbackup-1.2.0.tar.gz (4.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/home/me/.local/lib/python3.10/site-packages/pkgconfig/pkgconfig.py", line 91, in _wrapper
          return func(*args, **kwargs)
        File "/home/me/.local/lib/python3.10/site-packages/pkgconfig/pkgconfig.py", line 125, in exists
          return call(cmd) == 0
        File "/usr/lib/python3.10/subprocess.py", line 345, in call
          with Popen(*popenargs, **kwargs) as p:
        File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-3_i6up_s/borgbackup_775a607c8c074fcb8812ace70932a084/setup.py", line 185, in <module>
          setup_crypto.crypto_ext_kwargs(pc, system_prefix_openssl),
        File "/tmp/pip-install-3_i6up_s/borgbackup_775a607c8c074fcb8812ace70932a084/setup_crypto.py", line 28, in crypto_ext_kwargs
          if pc and pc.exists('libcrypto'):
        File "/home/me/.local/lib/python3.10/site-packages/pkgconfig/pkgconfig.py", line 93, in _wrapper
          raise EnvironmentError("pkg-config probably not installed: %r" % e)
      OSError: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
xmg:[me]:~$




Free Snowden. Free Assange.

Roberto

Zitat von: Daemon am 20. Mai 2022, 07:45:44Python-pip ist der Python Paketmanager. Irgendwie hat mittlerweile fast jede Programmiersprache und jedes Sys Admin Tool seinen eigenen Paketmanager.

Deine Python Version ist zu alt, du brauchst mindestens Python 3.8, so wie ich es aus der Fehlermeldung rauslese.

Ich habe kein Artix installiert (noch nicht mal eine Arch Distribution), deshalb kann ich es nicht testen.

Die aktuelle Python Version in Artix ist
python-3.10.4-1

Drum lächle und sei froh, denn es könnte schlimmer kommen. Und ich lächelte und war froh ... und es kam schlimmer ;)

Thats_me

Das ist verwirrend.
In octopi (nehme ich nur zum schnellen Nachschauen und Suchen) wird die Version 3.10.4-1 als installiert angezeigt.
Bei der Terminalabfrage wie oben python -V 3.10.4

Pacman -Q nur 3.10 und entsprechend (?) auch auch /usr/lib/python3.1
xmg:[me]:~$ pacman -Q
python 3.10.4-1
python-appdirs 1.4.4-6
python-cachecontrol 1:0.12.6-4
python-cairo 1.21.0-1
python-certifi 2021.10.8-3
python-cffi 1.15.0-3
python-chardet 4.0.0-5
python-colorama 0.4.4-6
python-contextlib2 0.6.0.post1-6
python-cryptography 37.0.0-1
python-distlib 0.3.4-1
python-distro 1.7.0-1
python-dnspython 1:2.2.1-1
python-gobject 3.42.1-1
python-html5lib 1.1-11
python-idna 3.3-4
python-importlib-metadata 4.8.1-3
python-markdown 3.3.7-1
python-more-itertools 8.12.0-2
python-msgpack 1.0.3-1
python-ordered-set 4.0.2-6
python-packaging 21.3-1
python-pep517 0.12.0-4
python-pexpect 4.8.0-6
python-pip 21.0-1
python-ply 3.11-10
python-progress 1.6-5
python-ptyprocess 0.7.0-4
python-pycparser 2.21-3
python-pycryptodome 3.14.1-1
python-pycups 2.0.1-5
python-pycurl 7.45.1-1
python-pyopenssl 22.0.0-1
python-pyparsing 3.0.9-1
python-requests 2.27.1-1
python-resolvelib 0.5.5-4
python-retrying 1.3.3-13
python-setuptools 1:60.6.0-1
python-six 1.16.0-5
python-toml 0.10.2-7.1
python-tomli 2.0.1-1
python-urllib3 1.26.9-1
python-webencodings 0.5.1-9

Aber /var/lib/pacman/local/python-3.10.4-1

Warum sind die Versionsangaben so unterschiedlich?
Free Snowden. Free Assange.

gosia

Hallo Thats_me,
Zitat von: Thats_me am 20. Mai 2022, 19:34:32Warum sind die Versionsangaben so unterschiedlich?

naja, so unterschiedlich sind die Versionen nun auch nicht. Die Versionsangabe mittels Option -V lässt oft die Minorangabe, oder besser Subminor (hier -1) weg. Das bedeutet nichts und sieht bei mir genauso aus. Also ich halte das für einen Nebenschauplatz, der nirgendwo hinführt. Mit anderen Worten, die Python-Version ist bei dir nicht das Problem.
Das Problem ist wohl eher das nicht gefundene/vorhandene pkg-config
Zitat von: Thats_me am 20. Mai 2022, 17:45:57
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
Apropos fehlend, übersehe ich es oder sind die Ausgaben von
pip3 show pip borgbackup pkgconfig
pacman -Ss pkgconfig
tatsächlich nicht mit dabei?

Wie es auch sei, installiere mal pkgconf, das könnte schon helfen. Leider kann ich jetzt noch nicht entscheiden, ob pkgconf oder python-pkgconfig

viele Grüsse gosia

Thats_me

Danke gosia,

sorry, dass ich die beiden anderen Infos nicht gepostet habe.

xmg:[me]:~$ pip3 show pip borgbackup pkgconfig
WARNING: Package(s) not found: borgbackup
Name: pip
Version: 21.0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/lib/python3.10/site-packages
Requires: 
Required-by: 
---
Name: pkgconfig
Version: 1.5.5
Summary: Interface Python with pkg-config
Home-page: https://github.com/matze/pkgconfig
Author: Matthias Vogelgesang
Author-email: matthias.vogelgesang@gmail.com
License: MIT
Location: /home/me/.local/lib/python3.10/site-packages
Requires: 
Required-by:



xmg:[me]:~$ pacman -Ss pkgconfig
system/pkgconf 1.8.0-1 (base-devel)
    Package compiler and linker metadata toolkit
world/perl-extutils-pkgconfig 1.16-8
    The Perl Pkgconfig module
galaxy/perl-pkgconfig 0.25026-2
    Pure-Perl Core-Only replacement for pkg-config
galaxy/perl-pkgconfig-libpkgconf 0.11-3
    Perl bindings for libpkgconf
galaxy/python-pkgconfig 1.5.5-3
    Python module to interface with the pkg-config command line tool
galaxy/ruby-pkg-config 1.4.6-1
    Implementation of pkg-config in ruby
xmg:[me]:~$
Free Snowden. Free Assange.

gosia

Hallo Thats_me,
Zitat von: Thats_me am 21. Mai 2022, 07:45:01sorry, dass ich die beiden anderen Infos nicht gepostet habe.
kein Problem, ich vergesse auch oft die Hälfte.
Aber jetzt weiss ich, dass dir eventuell pkgconf fehlt. Also installiere mal pkgconf mit pacman, yay oder trizen, ganz nach belieben und probiere danach nochmals borgbackup mit pip3 zu installieren.

viele Grüsse gosia

Thats_me

Super gosia,

hat geklappt. Ganz lieben Dank!! :-*
Dann lese ich jetzt mal das Ubuntu wiki, wie ich das Ding starte und handhabe. Bzw. wie ich die Gui drauf bekomme
https://github.com/MTrage/Borg-BackUP-GUI

Allen ein schönes Wochenende!
Free Snowden. Free Assange.