shamhi / HamsterKombatBot

Bot that mines coins in HamsterKombat
Apache License 2.0
425 stars 126 forks source link

Failed to build TgCrypto ERROR: Could not build wheels for TgCrypto, which is required to install pyproject.toml-based projects #319

Open MikhailKamado opened 1 week ago

MikhailKamado commented 1 week ago

How can I fix the error?

Activating virtual environment...
Starting the bot...
TgCrypto is missing! Pyrogram will work the same, but at a much slower speed. More info: https://docs.pyrogram.org/topics/speedups
Traceback (most recent call last):
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\main.py", line 4, in <module>
    from bot.utils.launcher import process
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\bot\utils\__init__.py", line 2, in <module>
    from . import launcher
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\bot\utils\launcher.py", line 8, in <module>
    from better_proxy import Proxy
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\venv\Lib\site-packages\better_proxy\__init__.py", line 1, in <module>
    from .proxy import Proxy
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\venv\Lib\site-packages\better_proxy\proxy.py", line 5, in <module>
    from pydantic import BaseModel
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\venv\Lib\site-packages\pydantic\__init__.py", line 383, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mikha\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\venv\Lib\site-packages\pydantic\main.py", line 12, in <module>
    import pydantic_core
  File "C:\Users\mikha\OneDrive\Рабочий стол\HamsterKombatBot-main\venv\Lib\site-packages\pydantic_core\__init__.py", line 6, in <module>
    from ._pydantic_core import (
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
yoyoallf commented 1 week ago

cmd - напиши pip install pydantic_core

TgCrypto is missing!

pip install TgCrypto

MikhailKamado commented 1 week ago

pydantic_core установил:

C:\Users\mikha>pip install pydantic_core
Requirement already satisfied: pydantic_core in c:\users\mikha\appdata\local\programs\python\python312\lib\site-packages (2.18.4)
Requirement already satisfied: typing-extensions!=4.7.0,>=4.6.0 in c:\users\mikha\appdata\local\programs\python\python312\lib\site-packages (from pydantic_core) (4.12.2)

TgCrypto выдаёт ошибку:

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
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
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  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
Jackricher1990 commented 1 week ago

win10sdk should be installed

yoyoallf commented 1 week ago

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools"

Нужно установить)

MikhailKamado commented 1 week ago

win10sdk установил не помогло

MikhailKamado commented 1 week ago

ошибка: требуется Microsoft Visual C ++ 14.0 или более поздней версии. Получите ее с помощью "Microsoft C ++ Build Tools"

Нужно установить)

Я пытался установить, написало что данная или новее версия уже стоит на компьютере