libtorrent upgrade: No libtorrent library found error

General support for problems installing or using Deluge
Post Reply
bolshoi
Member
Member
Posts: 13
Joined: Sun Oct 25, 2020 5:42 am

libtorrent upgrade: No libtorrent library found error

Post by bolshoi »

Deluge daemon refuses to load after upgrading libtorrent-rasterbar to 2.0.7_1 from 2.0.7

Code: Select all

deluge.error.LibtorrentImportError: No libtorrent library found: No module named 'libtorrent'
Running on M1 macOS, libtorrent installed via brew, deluge via pip.

Any clue?

Thanks!
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: libtorrent upgrade: No libtorrent library found error

Post by mhertz »

Sorry I don't know, but only change was changing to python 3.10 I see - can you import manually without error from python 3.10 I.e 'python3 import libtorrent; print(libtorrent.version)', and also check default python3 version with 'python3 -V' just in-case(though don't know how important that is honestly, but regardless).

As said, don't know anything other about it I'm affraid, hopefully others do, so please do interfere in that case :)
bolshoi
Member
Member
Posts: 13
Joined: Sun Oct 25, 2020 5:42 am

Re: libtorrent upgrade: No libtorrent library found error

Post by bolshoi »

Thanks, that could be the root cause, I'm running Python 3.9.13

Python 3.9.13 is the latest official release on brew, do you recommend I upgrade to 3.10 regardless?

Cheers
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: libtorrent upgrade: No libtorrent library found error

Post by mhertz »

The only change in brew's libtorrent package you updated, is python3.10 dependency I.e:
https://github.com/Homebrew/homebrew-co ... 08da8e5955

So don't understand if let's you not have it, but as said don't know.

Did this work BTW - I'm guessing not, since deluged neither.

Code: Select all

python3 -c 'import libtorrent; print(libtorrent.version)' 
(I posted it wrong in my last post, apologies)
bolshoi
Member
Member
Posts: 13
Joined: Sun Oct 25, 2020 5:42 am

Re: libtorrent upgrade: No libtorrent library found error

Post by bolshoi »

Thank you for your help, FYI that command returned the same error.

looks like the default python on my mac was python@3.9 (via homebrew) but I also had python@3.10 in homebrew's cellar due to the libtorrent upgrade.

I fixed it by making python@3.10 default:

Code: Select all

 brew unlink python@3.9
 brew link --overwrite python@3.10
Then reinstalled all packages via pip3.
Deluge is now back in business.

Cheers
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: libtorrent upgrade: No libtorrent library found error

Post by mhertz »

Awesome, good job mate, and thanks for posting back direct solution :)
Post Reply