[build_ext在Windows上使用pip安装google-cloud-vision时未找到

问题描述 投票:-1回答:1

正如标题所述,在运行Python 3.8的Windows 10计算机上安装Google Cloud Vision时出现错误。

我已经在PATH中添加了python,并且还安装了Visual Studio Code的构建工具(请阅读可能有帮助的地方-没帮助。

下面是我尝试过的命令:pip install google-cloud-visionpip install google-cloud-vision --ignore-installed

我得到的错误是:

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\administrator\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\2\\pip-install-n38ejusk\\grpcio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\2\\pip-install-n38ejusk\\grpcio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\2\pip-record-tnd8s2qv\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\Administrator\AppData\Local\Temp\2\pip-install-n38ejusk\grpcio\
    Complete output (62 lines):
    Found cython-generated files...
    running install
    running build
    running build_py
    running build_project_metadata
    creating python_build
    creating python_build\lib.win-amd64-3.8
    creating python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_channel.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_common.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_compression.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_grpcio_metadata.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_interceptor.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_plugin_wrapping.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_server.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\_utilities.py -> python_build\lib.win-amd64-3.8\grpc
    copying src\python\grpcio\grpc\__init__.py -> python_build\lib.win-amd64-3.8\grpc
    creating python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\implementations.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\interfaces.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\utilities.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\_client_adaptations.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\_metadata.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\_server_adaptations.py -> python_build\lib.win-amd64-3.8\grpc\beta
    copying src\python\grpcio\grpc\beta\__init__.py -> python_build\lib.win-amd64-3.8\grpc\beta
    creating python_build\lib.win-amd64-3.8\grpc\experimental
    copying src\python\grpcio\grpc\experimental\gevent.py -> python_build\lib.win-amd64-3.8\grpc\experimental
    copying src\python\grpcio\grpc\experimental\session_cache.py -> python_build\lib.win-amd64-3.8\grpc\experimental
    copying src\python\grpcio\grpc\experimental\__init__.py -> python_build\lib.win-amd64-3.8\grpc\experimental
    creating python_build\lib.win-amd64-3.8\grpc\framework
    copying src\python\grpcio\grpc\framework\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework
    creating python_build\lib.win-amd64-3.8\grpc\_cython
    copying src\python\grpcio\grpc\_cython\__init__.py -> python_build\lib.win-amd64-3.8\grpc\_cython
    creating python_build\lib.win-amd64-3.8\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\cardinality.py -> python_build\lib.win-amd64-3.8\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\style.py -> python_build\lib.win-amd64-3.8\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework\common
    creating python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\abandonment.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\callable_util.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\future.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\logging_pool.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\stream.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\stream_util.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework\foundation
    creating python_build\lib.win-amd64-3.8\grpc\framework\interfaces
    copying src\python\grpcio\grpc\framework\interfaces\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces
    creating python_build\lib.win-amd64-3.8\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\base.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\utilities.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\base
    creating python_build\lib.win-amd64-3.8\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\face.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\utilities.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\__init__.py -> python_build\lib.win-amd64-3.8\grpc\framework\interfaces\face
    creating python_build\lib.win-amd64-3.8\grpc\_cython\_cygrpc
    copying src\python\grpcio\grpc\_cython\_cygrpc\__init__.py -> python_build\lib.win-amd64-3.8\grpc\_cython\_cygrpc
    creating python_build\lib.win-amd64-3.8\grpc\_cython\_credentials
    copying src\python\grpcio\grpc\_cython\_credentials\roots.pem -> python_build\lib.win-amd64-3.8\grpc\_cython\_credentials
    running build_ext
    error: [WinError 2] The system cannot find the file specified
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\administrator\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\2\\pip-install-n38ejusk\\grpcio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\2\\pip-install-n38ejusk\\grpcio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\2\pip-record-tnd8s2qv\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

任何帮助将不胜感激!

正如标题所述,在运行Python 3.8的Windows 10计算机上安装Google Cloud Vision时出现错误。我已经将python添加到了我的PATH中,并且还安装了Build Tools for Visual ...

python pip google-cloud-vision
1个回答
0
投票

很遗憾,我们尚未针对3.8进行预编译。如果可以使用Python 3.6或3.7,则该问题应消除。 https://pypi.org/project/grpcio/#files


0
投票

我也有同样的问题。我如何从3.8降级到3.7? @Raywon

© www.soinside.com 2019 - 2024. All rights reserved.