bit-team / backintime

Back In Time - An easy-to-use backup tool for GNU Linux using rsync in the back
https://backintime.readthedocs.io
GNU General Public License v2.0
1.9k stars 175 forks source link

ModuleNotFoundError: No module named 'packaging' #1728

Closed ActionSkull closed 3 weeks ago

ActionSkull commented 1 month ago

Backintime won't launch for me. I tried running from terminal, and got the following:

Traceback (most recent call last): File "/usr/share/backintime/common/backintime.py", line 27, in import tools File "/usr/share/backintime/common/tools.py", line 37, in from packaging.version import Version ModuleNotFoundError: No module named 'packaging'

I'm running backintime version 1.4.1-1, Python 3.12.2.

buhtz commented 1 month ago

Where did you get BIT from? Pease specify as precisely as you can the package or installation source where you got Back In Time from. Sometimes there are multiple alternatives, like in for Arch-based distros.

Please provide the output of the console command backintime --diagnostics.

Please also see the installation instructions.

ActionSkull commented 1 month ago

I got it from ppa:bit-team/stable

On Sat, May 25, 2024 at 12:22 PM buhtz @.***> wrote:

Where did you get BIT from?

— Reply to this email directly, view it on GitHub https://github.com/bit-team/backintime/issues/1728#issuecomment-2131330425, or unsubscribe https://github.com/notifications/unsubscribe-auth/A37VBIONF4XKHQXDF3JZLNTZEC3FNAVCNFSM6AAAAABIIKLCRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZRGMZTANBSGU . You are receiving this because you authored the thread.Message ID: @.***>

buhtz commented 1 month ago

I got it from ppa:bit-team/stable

As we state in our install instructions it is not recommended to use package sources other then the official repositories of your GNU Linux distribution. We as upstream project do not support such sources.

The relationship between ppa:bit-team/stable and this upstream project is complex. One of our upstream maintainers does manage this PPA, too. But he is not activate anymore. You can treat the PPA as dead.

ActionSkull commented 1 month ago

I'm running Linux Mint 21.1. The version in the repository is Backintime 1.2.1-3. I was having issues with that version not launching, and the readme suggested a newer version, with ppa:bit-team/stable being the top suggestion. Running the version that comes with my distro gives me the following error:

ModuleNotFoundError: No module named 'distutils'

However, distutils is installed.

The other suggested alternate install, https://git.sdxlive.com/PPA/about, seems to be down at the moment. At least, I can't get to it.

I think the version of python I have at the moment may be the issue? I seem to recall having to upgrade it at some point to get pycharm to work, and the date of my last successful backup roughly matches when I probably made changes to the version of python I'm running.

Cheers, Ian

On Sun, May 26, 2024 at 2:28 PM buhtz @.***> wrote:

I got it from ppa:bit-team/stable

As we state in our install instructions it is not recommended to use package sources other then the official repositories of your GNU Linux distribution. We as upstream project do not support such sources.

The relationship between ppa:bit-team/stable https://bugs.launchpad.net/~bit-team and this upstream project is complex. One of our upstream maintainers does manage this PPA, too. But he is not activate anymore. You can treat the PPA as dead.

— Reply to this email directly, view it on GitHub https://github.com/bit-team/backintime/issues/1728#issuecomment-2132319411, or unsubscribe https://github.com/notifications/unsubscribe-auth/A37VBIJDB7PNUZFTSHMSRPTZEISTFAVCNFSM6AAAAABIIKLCRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGMYTSNBRGE . You are receiving this because you authored the thread.Message ID: @.***>

buhtz commented 1 month ago

A hacky and short solution: When the error is just about missing packages you can try to install them. Try your distros repository (e.g. sudo apt install python3-packaging) first. Secondary you can use PyPi via python3 -m pip install packaging). If this does not help you can edit the BIT launcher script /etc/bin/backintime-qt. There you find a line starting with python3 -Es. Remove the -Es switch. This might help.

In the long run contact your distros maintainer. I don't understand why the use such an outdated version. Mint 21.1 doesn't sound old but maybe I misunderstand the Wikipedia entry about Mint. The latest Mint is based on Ubuntu 22.04 which is the LTS version before the previous LTS version. That is to old. Your Mint is based on Debian? Which version?

@jean-christophe-manciot: Dear Jean, can you give us a status update about your PPA? Seems to be offline.

In the end you could try to install the latest BIT version from our upstream repo. See https://github.com/bit-team/backintime/blob/dev/CONTRIBUTING.md#build--install . But first check if Qt6 (PyQt6) is available on your system.

ActionSkull commented 1 month ago

Any time I try to install the packages that it says are missing, the installer tells me that it's already installed.

Removing -Es from the config file made no difference.

You are correct, the Mint I'm using is based on Ubuntu 22.04.

Attempting to clone your repo to my device returns the following error:

Cloning into 'backintime'...ssh: connect to host guthub.com http://guthub.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.

When I try ssh -T @.***, I get success, so I seem to be able to connect to github normally. I am also able to push changes to my own github repository.

On Mon, May 27, 2024 at 1:58 AM buhtz @.***> wrote:

A hacky and short solution: When the error is just about missing packages you can try to install them. Try your distros repository (e.g. sudo apt install python3-packaging) first. Secondary you can use PyPi via python3 -m pip install packaging). If this does not help you can edit the BIT launcher script /etc/bin/backintime-qt. There you find a line starting with python3 -Es. Remove the -Es switch. This might help.

In the long run contact your distros maintainer. I don't understand why the use such an outdated version. Mint 21.1 doesn't sound old but maybe I misunderstand the Wikipedia entry about Mint. The latest Mint is based on Ubuntu 22.04 which is the LTS version before the previous LTS version. That is to old. Your Mint is based on Debian? Which version?

@jean-christophe-manciot https://github.com/jean-christophe-manciot: Dear Jean, can you give us a status update about your PPA? Seems to be offline.

In the end you could try to install the latest BIT version from our upstream repo. See https://github.com/bit-team/backintime/blob/dev/CONTRIBUTING.md#build--install . But first check if Qt6 (PyQt6) is available on your system.

— Reply to this email directly, view it on GitHub https://github.com/bit-team/backintime/issues/1728#issuecomment-2132697854, or unsubscribe https://github.com/notifications/unsubscribe-auth/A37VBIK42XYDY74BFUNEGI3ZELDOZAVCNFSM6AAAAABIIKLCRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGY4TOOBVGQ . You are receiving this because you authored the thread.Message ID: @.***>

buhtz commented 1 month ago

Any time I try to install the packages that it says are missing, the installer tells me that it's already installed.

Please be more precise in your descriptions. How do you installed? "apt", "pip" or something else? Post the full command and output.

Cloning into 'backintime'...ssh: connect to host guthub.com http://guthub.com

It is "github" not "guthub".

Again I strongly recommend to upgrade your distro, change your distro and/or contact your distro maintainers.

ActionSkull commented 1 month ago

I was using the exact command lines you suggested for installing the missing packages.

sudo apt install python3-packaging python3 -m pip install packaging

Thanks for catching my guthub typo.

After you mentioned that the version in the Ubuntu repo that Mint 21.1 uses was old, I went looking for a way to retrieve the newer supported version from Ubuntu. I found these:

http://archive.ubuntu.com/ubuntu/pool/universe/b/backintime/backintime-common_1.4.3-1_all.deb http://archive.ubuntu.com/ubuntu/pool/universe/b/backintime/backintime-qt_1.4.3-1_all.deb

And now I seem to be up and running. Thank you for your help. Linux Mint has never really been an issue for me, but I guess I can see the problem with using a distro that is based on another, older distro. Perhaps some day I'll switch back to Ubuntu from Mint.

The website that steered me to where I could download more recent "official" versions from Ubuntu was https://pkgs.org/. I'll definitely be keeping that website in my back pocket for future use.

Cheers, Ian

On Mon, May 27, 2024 at 8:40 AM buhtz @.***> wrote:

Any time I try to install the packages that it says are missing, the installer tells me that it's already installed.

Please be more precise in your descriptions. How do you installed? "apt", "pip" or something else? Post the full command and output.

Cloning into 'backintime'...ssh: connect to host guthub.com http://guthub.com

It is "github" not "guthub"

— Reply to this email directly, view it on GitHub https://github.com/bit-team/backintime/issues/1728#issuecomment-2133400417, or unsubscribe https://github.com/notifications/unsubscribe-auth/A37VBIKYVP6RBPXQUTH4DOLZEMSTRAVCNFSM6AAAAABIIKLCRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGQYDANBRG4 . You are receiving this because you authored the thread.Message ID: @.***>

buhtz commented 3 weeks ago

Closing this ticket based on the comment above. Feel free to reopen if the problem still exists. Thank you for your efforts. If you have any further questions, ideas or encounter any other issues, please don't hesitate to let us know.

Best regards, Christian