admin管理员组

文章数量:1123712

I try to install libtorrent for python by two methods, first:

pip install libtorrent

get this error:

ERROR: Could not find a version that satisfies the requirement libtorrent (from versions: none)

ERROR: No matching distribution found for libtorrent

second: download file from pypi and :

pip install libtorrent-2.0.9-cp310-cp310-win_amd64.whl

get this error:

ERROR: libtorrent-2.0.9-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

Also, the latest version of pip(24.3.1) setuptools(75.8.0) wheel(0.45.1) is installed.

I read this question and I think the problem is related to CPython version. libtorrent requires CPython 3.10 and my python is Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32.

Any kind of help is appreciated.

I try to install libtorrent for python by two methods, first:

pip install libtorrent

get this error:

ERROR: Could not find a version that satisfies the requirement libtorrent (from versions: none)

ERROR: No matching distribution found for libtorrent

second: download file from pypi.org and :

pip install libtorrent-2.0.9-cp310-cp310-win_amd64.whl

get this error:

ERROR: libtorrent-2.0.9-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

Also, the latest version of pip(24.3.1) setuptools(75.8.0) wheel(0.45.1) is installed.

I read this question and I think the problem is related to CPython version. libtorrent requires CPython 3.10 and my python is Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32.

Any kind of help is appreciated.

Share Improve this question edited yesterday hassan asked yesterday hassanhassan 34 bronze badges 4
  • If your installed Python is 3.12, why did you download the Python 3.10 version? (cp310) CPython is just the name of the most widely used Python implementation, and the default for Windows users. From the PyPI page pypi.org/project/libtorrent/#files, it appears there is no version for Python 3.12 - you should install Python 3.10 (it can be installed side-by-side with 3.12) and create an environment with that, then install the package there. – Grismar Commented yesterday
  • 3.10 is last version. Isn't the required version the minimum version, not the exact version? – hassan Commented yesterday
  • @hassan: Try to use the exact version, it is not guaranteed a module for 3.10 works for 3.12 – Maurice Meyer Commented 21 hours ago
  • Some packages can be used on newer versions of Python, particularly pure Python packages. However, packages that rely on C-extensions or that specifically specify the Python version they are compatible with require exactly that version. You can use any 3.10.x, but not a 3.11 or newer. You might be able to the get the package source and build from source for a newer version, but that's going to require a bunch of work, far more than just adding a Python version. I just tested, it installs without problems on 3.10. – Grismar Commented 21 hours ago
Add a comment  | 

1 Answer 1

Reset to default 0

You must include the Python version.

Try this for Python 3.10

py -3.10 -m pip install libtorrent

For Python 3.12

py -3.12 -m pip install libtorrent

本文标签: install libtorrent python libraryStack Overflow