arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.15k stars 993 forks source link

ImportError: DLL load failed while importing libtorrent #7338

Open a-sajjad72 opened 1 year ago

a-sajjad72 commented 1 year ago

Please provide the following information

libtorrent version (or branch): 2.0.7

platform/architecture: Windows 10 22H2

compiler and compiler version: installed through pip

pip version: pip 23.0.1

python version: Python 3.10.8

please describe what symptom you see, what you would expect to see instead and how to reproduce it.

Actual Behaviour

i installed libtorrent using pip. At start when I import it shows error #6689. i fixed it by placing the missing dll dependecies to the Python310\Lib\site-packages where libtorrent.cp310-win_amd64.pyd is placed. Now it shows

ImportError: DLL load failed while importing libtorrent: The application has failed to start because its side-by-side configuration is incorrect.

Expected Behavior

it should be import smoothly. i mean without any errors.

Dobatymo commented 1 year ago

Same issue here. I tested libtorrent==2.0.5, 2.0.6, 2.0.7, 2.0.9. All of them cannot find libcrypto-1_1-x64.dll and libssl-1_1-x64.dll.

eviscerat commented 11 months ago

Any update on this issue?

Alpagateau commented 7 months ago

Same probleme here, I installed torrentp but i can't import it, since it depends on Libtorrent which itself causes the error.

a-sajjad72 commented 7 months ago

Same probleme here, I installed torrentp but i can't import it, since it depends on Libtorrent which itself causes the error.

are you also on windows???

Alpagateau commented 7 months ago

yes i am

abdulanzil commented 2 months ago

I fixed this issue by creating a conda environment with python version 3.10.0. When I checked the versions of pip and libtorrent package, it shows; pip version -> 24.0 libtorrent -> 2.0.9

Alpagateau commented 2 months ago

is there a workaround without using conda ?

abdulanzil commented 2 months ago

is there a workaround without using conda ?

I used conda because I need different python versions for different projects. If you are ready to install python version 3.10.0 in your system, you don't have to use anaconda. Just install the provided version of libtorrent using pip install. pip install libtorrent==2.0.9

a-sajjad72 commented 1 month ago

is there a workaround without using conda ?

I used conda because I need different python versions for different projects. If you are ready to install python version 3.10.0 in your system, you don't have to use anaconda. Just install the provided version of libtorrent using pip install. pip install libtorrent==2.0.9

Thank You @abdulanzil for providing a solution/workaround for this issue. I think conda comes with many other pre-built binaries. so I suggest @Alpagateau to test it without conda environment to confirm that the issue is with the libraries or python version.

I will also try to recreate this issue for testing, on my end