tonfactory / tonsdk

Apache License 2.0
106 stars 37 forks source link

Problem with tonsdk installation. Error rc.exe #25

Open ZederBreys opened 11 months ago

ZederBreys commented 11 months ago

I have Visual Studio 2022 installed and when I tried to install tonsdk for the first time, I got an error asking me to install the MSVC 14.00 component through the Visual Studio Installer. After installation this error appeared, I haven't been able to fix it with solutions like this.

C:\Users\ZederBreys>pip install tonsdk
Collecting tonsdk
  Using cached tonsdk-1.0.13-py3-none-any.whl.metadata (7.9 kB)
Collecting pynacl>=1.4.0 (from tonsdk)
  Using cached PyNaCl-1.5.0-cp36-abi3-win_amd64.whl (212 kB)
Collecting bitarray==2.6.0 (from tonsdk)
  Using cached bitarray-2.6.0.tar.gz (102 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cffi>=1.4.1 (from pynacl>=1.4.0->tonsdk)
  Using cached cffi-1.16.0-cp311-cp311-win_amd64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.4.1->pynacl>=1.4.0->tonsdk)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Using cached tonsdk-1.0.13-py3-none-any.whl (71 kB)
Using cached cffi-1.16.0-cp311-cp311-win_amd64.whl (181 kB)
Building wheels for collected packages: bitarray
  Building wheel for bitarray (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for bitarray (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\test_bitarray.py -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\test_util.py -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\util.py -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\__init__.py -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\util.pyi -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\__init__.pyi -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\py.typed -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\bitarray.h -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\pythoncapi_compat.h -> build\lib.win-amd64-cpython-311\bitarray
      copying bitarray\test_data.pickle -> build\lib.win-amd64-cpython-311\bitarray
      running build_ext
      building 'bitarray._bitarray' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\bitarray
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\ZederBreys\AppData\Local\Programs\Python\Python311\include -IC:\Users\ZederBreys\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" /Tcbitarray/_bitarray.c /Fobuild\temp.win-amd64-cpython-311\Release\bitarray/_bitarray.obj
      _bitarray.c
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\ZederBreys\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\ZederBreys\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\ZederBreys\AppData\Local\Programs\Python\Python311\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" /EXPORT:PyInit__bitarray build\temp.win-amd64-cpython-311\Release\bitarray/_bitarray.obj /OUT:build\lib.win-amd64-cpython-311\bitarray\_bitarray.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\bitarray\_bitarray.cp311-win_amd64.lib
      _bitarray.obj : warning LNK4197: несколько раз указан экспорт "PyInit__bitarray"; использована первая спецификация
         Создается библиотека build\temp.win-amd64-cpython-311\Release\bitarray\_bitarray.cp311-win_amd64.lib и объект build\temp.win-amd64-cpython-311\Release\bitarray\_bitarray.cp311-win_amd64.exp
      Создание кода
      Создание кода завершено
      LINK : fatal error LNK1327: сбой при выполнении rc.exe
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit code 1327
      [end of output]

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

Try this one https://stackoverflow.com/questions/14372706/visual-studio-cant-build-due-to-rc-exe