Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: pip install uagents error with grpcio on Windows. #2881

Open
4 tasks done
ekzarov opened this issue Mar 22, 2023 · 0 comments
Open
4 tasks done

Issue: pip install uagents error with grpcio on Windows. #2881

ekzarov opened this issue Mar 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ekzarov
Copy link

ekzarov commented Mar 22, 2023

Prerequisites

Expected Behavior

Trying to install uAgetns with:
pip install uagents

waiting for 'Long runnin Building wheel for grpcio (setup.py) ...' for a while and then receive error:
` File "C:\Python311\Lib\site-packages\setuptools_distutils\spawn.py", line 70, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe' failed with exit code 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\commands.py", line 280, in build_extensions
      build_ext.build_ext.build_extensions(self)
    File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "C:\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
      _build_ext.build_extension(self, ext)
    File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
      objects = self.compiler.compile(
                ^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 421, in compile
      raise CompileError(msg)
  distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for grpcio`

Operating system: Windows 11 Pro. Python 311. Everything works on Windows + WSL + Debian. So not working on direct windows using.

Current Behavior

Cannot install uagents.

To Reproduce

Type pip install uagents in windows 11 pro.

Context

No response

Failure Logs

s\cares\include -Ithird_party\cares -Ithird_party\cares\cares -Ithird_party\re2 -Ithird_party\boringssl-with-bazel\src\include -Ithird_party\upb -Isrc\core\ext\upb-generated -Isrc\core\ext\upbdefs-generated -Ithird_party\xxhash -Ithird_party\zlib -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tcsrc/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c /Fopython_build\temp.win-amd64-cpython-311\Release\src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.obj -std=c++14 /MT   
      cl : Command line warning D9025 : overriding '/MD' with '/MT'
      cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
      router.upb.c
      third_party\upb\upb/upb.h(349): warning C4244: 'function': conversion from 'uint64_t' to 'uint32_t', possible loss of data
      third_party\upb\upb/table_internal.h(198): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      third_party\upb\upb/msg_internal.h(145): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      third_party\upb\upb/msg_internal.h(530): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -D_WIN32_WINNT=1536 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"\\\"Python\\\"\" -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"\\\"1.47.0\\\"\" -DOPENSSL_NO_ASM=1 -DGPR_BACKWARDS_COMPATIBILITY_MODE=1 -DWIN32_LEAN_AND_MEAN=1 -DCARES_STATICLIB=1 -DGRPC_ARES=0 -DNTDDI_VERSION=100663296 -DNOMINMAX=1 -DMS_WIN64=1 -Isrc\python\grpcio -Iinclude -I. -Ithird_party\abseil-cpp -Ithird_party\address_sorting\include -Ithird_party\cares\cares\include -Ithird_party\cares -Ithird_party\cares\cares -Ithird_party\re2 -Ithird_party\boringssl-with-bazel\src\include -Ithird_party\upb -Isrc\core\ext\upb-generated -Isrc\core\ext\upbdefs-generated -Ithird_party\xxhash -Ithird_party\zlib -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tcsrc/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c /Fopython_build\temp.win-amd64-cpython-311\Release\src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.obj -std=c++14 /MT
      cl : Command line warning D9025 : overriding '/MD' with '/MT'
      cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
      http_connection_manager.upb.c
      third_party\upb\upb/upb.h(349): warning C4244: 'function': conversion from 'uint64_t' to 'uint32_t', possible loss of data
      third_party\upb\upb/table_internal.h(198): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      third_party\upb\upb/msg_internal.h(145): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      third_party\upb\upb/msg_internal.h(530): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\core\ext\upb-generated\envoy\extensions\filters\network\http_connection_manager\v3\http_connection_manager.upb.c : fatal error C1083: Cannot open compiler generated file: '': Invalid argument
      creating Users\ALEXAN~1\AppData\Local\Temp\tmp5n496rsh
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcC:\Users\ALEXAN~1\AppData\Local\Temp\tmp5n496rsh\a.c /FoUsers\ALEXAN~1\AppData\Local\Temp\tmp5n496rsh\a.obj
      a.c
      Traceback (most recent call last):
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 529, in _fallback_spawn
          yield bag
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
          return super().spawn(cmd, env=env)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: _commandfile_spawn() got an unexpected keyword argument 'env'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 419, in compile
          self.spawn(args)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 516, in spawn
          with self._fallback_spawn(cmd, env) as fallback:
        File "C:\Python311\Lib\contextlib.py", line 155, in __exit__
          self.gen.throw(typ, value, traceback)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 537, in _fallback_spawn
          bag.value = super().spawn(cmd)
                      ^^^^^^^^^^^^^^^^^^
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\_spawn_patch.py", line 54, in _commandfile_spawn
          _classic_spawn(self, command)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 1041, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\spawn.py", line 70, in spawn
          raise DistutilsExecError(
      distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\commands.py", line 280, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "C:\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 421, in compile
          raise CompileError(msg)
      distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\setup.py", line 541, in <module>
          setuptools.setup(
        File "C:\Python311\Lib\site-packages\setuptools\__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Python311\Lib\site-packages\setuptools\dist.py", line 1221, in run_command
          super().run_command(command)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Python311\Lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\install.py", line 697, in run
          self.run_command('build')
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Python311\Lib\site-packages\setuptools\dist.py", line 1221, in run_command
          super().run_command(command)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Python311\Lib\site-packages\setuptools\dist.py", line 1221, in run_command
          super().run_command(command)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 84, in run
          _build_ext.run(self)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
          self.build_extensions()
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\commands.py", line 284, in build_extensions
          raise CommandError(
      commands.CommandError: Failed `build_ext` step:
      Traceback (most recent call last):
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 529, in _fallback_spawn
          yield bag
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
          return super().spawn(cmd, env=env)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: _commandfile_spawn() got an unexpected keyword argument 'env'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 419, in compile
          self.spawn(args)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 516, in spawn
          with self._fallback_spawn(cmd, env) as fallback:
        File "C:\Python311\Lib\contextlib.py", line 155, in __exit__
          self.gen.throw(typ, value, traceback)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 537, in _fallback_spawn
          bag.value = super().spawn(cmd)
                      ^^^^^^^^^^^^^^^^^^
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\_spawn_patch.py", line 54, in _commandfile_spawn
          _classic_spawn(self, command)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 1041, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\spawn.py", line 70, in spawn
          raise DistutilsExecError(
      distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\Alexander\AppData\Local\Temp\pip-install-5wmeb6fw\grpcio_e4f33ca783d94638bad624fe5a912063\src\python\grpcio\commands.py", line 280, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "C:\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 421, in compile
          raise CompileError(msg)
      distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> grpcio

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
PS C:\dev\fetch\agents> 
@ekzarov ekzarov added the bug Something isn't working label Mar 22, 2023
@ekzarov ekzarov changed the title pip install uagents error with grpcio on Windows. Issue: pip install uagents error with grpcio on Windows. Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant