pythonpython-3.xpippyrogram

ERROR: Could not build wheels for tgcrypto, which is required to install pyproject.toml-based projects


PS D:\> pip3 install -U --upgrade pyrogram tgcrypto
Requirement already satisfied: pyrogram in d:\nlr\nlr\lib\site-packages (2.0.106)
Collecting tgcrypto
  Using cached TgCrypto-1.2.5.tar.gz (37 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pyaes==1.6.1 in d:\nlr\nlr\lib\site-packages (from pyrogram) (1.6.1)
Requirement already satisfied: pysocks==1.7.1 in d:\nlr\nlr\lib\site-packages (from pyrogram) (1.7.1)
Building wheels for collected packages: tgcrypto
  Building wheel for tgcrypto (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for tgcrypto (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\tests
      copying tests\__init__.py -> build\lib.win-amd64-cpython-312\tests
      creating build\lib.win-amd64-cpython-312\tests\cbc
      copying tests\cbc\test_cbc.py -> build\lib.win-amd64-cpython-312\tests\cbc
      copying tests\cbc\__init__.py -> build\lib.win-amd64-cpython-312\tests\cbc
      creating build\lib.win-amd64-cpython-312\tests\ctr
      copying tests\ctr\test_ctr.py -> build\lib.win-amd64-cpython-312\tests\ctr
      copying tests\ctr\__init__.py -> build\lib.win-amd64-cpython-312\tests\ctr
      creating build\lib.win-amd64-cpython-312\tests\ige
      copying tests\ige\test_ige.py -> build\lib.win-amd64-cpython-312\tests\ige
      copying tests\ige\__init__.py -> build\lib.win-amd64-cpython-312\tests\ige
      running build_ext
      building 'tgcrypto' extension

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tgcrypto
Failed to build tgcrypto
ERROR: Could not build wheels for tgcrypto, which is required to install pyproject.toml-based projects

Please solve wheels error in windows platform


Solution

  • Currently, TgCrypto is supported till python 3.11

    https://pypi.org/project/TgCrypto/

    enter image description here

    You need to install python 3.11 separately until it is supported for python 3.12