无法使用pip install grpcio安装grpcio [英] Unable to install grpcio using pip install grpcio

查看:1476
本文介绍了无法使用pip install grpcio安装grpcio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows计算机上使用pip install grpcio安装grpcio时出现错误.我在这里阅读https://github.com/grpc/grpc/issues/17829 ,这可能是由于setuptools版本中的错误引起的.我将我的setuptools升级到了最新版本,即41.0.1.仍然出现相同的构建错误.其他任何软件包都不会发生.我尝试在笔记本电脑上重新安装pip和python.我附上我的错误

I am getting error while installing grpcio using pip install grpcio on my windows machine.I read here - https://github.com/grpc/grpc/issues/17829 that it may be due to error in a version of setuptools. I upgraded my setuptools to the latest version i.e. 41.0.1 . Still getting the same build error. Its not happening for any other package. I have tried reinstalling pip and python both on my laptop. I'm attaching my error

Building wheels for collected packages: grpcio
Building wheel for grpcio (setup.py) ... error
ERROR: Complete output from command 'c:\python27\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'c:\\users\\s\\appdata\\local\\temp\\pip-install-ge5zhq\\grpcio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel
-d 'c:\users\s\appdata\local\temp\pip-wheel-txjhlh' --python-tag cp27:
  ERROR: Found cython-generated files...
  running bdist_wheel
  running build
  running build_py
  running build_project_metadata
  creating python_build
  creating python_build\lib.win-amd64-2.7
  creating python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_channel.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_common.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_compression.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_grpcio_metadata.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_interceptor.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_plugin_wrapping.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_server.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\_utilities.py -> python_build\lib.win-amd64-2.7\grpc
  copying src\python\grpcio\grpc\__init__.py -> python_build\lib.win-amd64-2.7\grpc
  creating python_build\lib.win-amd64-2.7\grpc\beta
  copying src\python\grpcio\grpc\beta\implementations.py -> python_build\lib.win-amd64-2.7\grpc\beta
  copying src\python\grpcio\grpc\beta\interfaces.py -> python_build\lib.win-amd64-2.7\grpc\beta
  copying src\python\grpcio\grpc\beta\utilities.py -> python_build\lib.win-amd64-2.7\grpc\beta
  copying src\python\grpcio\grpc\beta\_client_adaptations.py -> python_build\lib.win-amd64-2.7\grpc\beta
      copying src\python\grpcio\grpc\beta\_metadata.py -> python_build\lib.win-amd64-2.7\grpc\beta
      copying src\python\grpcio\grpc\beta\_server_adaptations.py -> python_build\lib.win-amd64-2.7\grpc\beta
      copying src\python\grpcio\grpc\beta\__init__.py -> python_build\lib.win-amd64-2.7\grpc\beta
      creating python_build\lib.win-amd64-2.7\grpc\experimental
      copying src\python\grpcio\grpc\experimental\gevent.py -> python_build\lib.win-amd64-2.7\grpc\experimental
      copying src\python\grpcio\grpc\experimental\session_cache.py -> python_build\lib.win-amd64-2.7\grpc\experimental
      copying src\python\grpcio\grpc\experimental\__init__.py -> python_build\lib.win-amd64-2.7\grpc\experimental
      creating python_build\lib.win-amd64-2.7\grpc\framework
      copying src\python\grpcio\grpc\frame`enter code here`work\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework
      creating python_build\lib.win-amd64-2.7\grpc\_cython
      copying src\python\grpcio\grpc\_cython\__init__.py -> python_build\lib.win-amd64-2.7\grpc\_cython
      creating python_build\lib.win-amd64-2.7\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\cardinality.py -> python_build\lib.win-amd64-2.7\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\style.py -> python_build\lib.win-amd64-2.7\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework\common
      creating python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\abandonment.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\callable_util.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\future.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\logging_pool.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\stream.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\stream_util.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework\foundation
      creating python_build\lib.win-amd64-2.7\grpc\framework\interfaces
      copying src\python\grpcio\grpc\framework\interfaces\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces
      creating python_build\lib.win-amd64-2.7\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\base.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\utilities.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\base
      creating python_build\lib.win-amd64-2.7\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\face.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\utilities.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\__init__.py -> python_build\lib.win-amd64-2.7\grpc\framework\interfaces\face
      creating python_build\lib.win-amd64-2.7\grpc\_cython\_cygrpc
      copying src\python\grpcio\grpc\_cython\_cygrpc\__init__.py -> python_build\lib.win-amd64-2.7\grpc\_cython\_cygrpc
      creating python_build\lib.win-amd64-2.7\grpc\_cython\_credentials
      copying src\python\grpcio\grpc\_cython\_credentials\roots.pem -> python_build\lib.win-amd64-2.7\grpc\_cython\_credentials
      running build_ext
      error: [Error 2] The system cannot find the file specified
      ----------------------------------------
      ERROR: Failed building wheel for grpcio
      Running setup.py clean for grpcio
    Failed to build grpcio

推荐答案

首先,升级pip

pip3 install --upgrade pip

然后,更新设置工具:

python3 -m pip install --upgrade setuptools


最后,使用:


At last, install grpcio using :

pip3 install --no-cache-dir  --force-reinstall -Iv grpcio==<version_number>

这篇关于无法使用pip install grpcio安装grpcio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆