在windows上安装带有pip的googlecloudvision时找不到build_ext

2024-04-28 23:15:34 发布

您现在位置:Python中文网/ 问答频道 /正文

正如标题所说,我在运行python3.8的windows10机器上安装googlecloudvision时遇到了一个错误。在

我已经将python添加到我的路径中,并且还安装了visualstudio代码的构建工具(在某个地方读到这可能会有帮助,但没有帮助)。在

下面是我尝试过的命令: 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.

任何帮助都将不胜感激!在


Tags: installpybuildcreatingsrcgrpclibframework