wtreston
wtreston

Reputation: 1061

build_ext not found whilst installing google-cloud-vision with pip on windows

As the title says, I'm getting an error whilst installing Google Cloud Vision on a Windows 10 machine running Python 3.8.

I've added python to my PATH and have also installed Build Tools for Visual Studio Code (read somewhere that this might help - it didn't).

Below are the commands that I have tried: pip install google-cloud-vision pip install google-cloud-vision --ignore-installed

The error I'm getting is:

    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.

Any help would be appreciated!

Upvotes: 1

Views: 608

Answers (1)

Raywon
Raywon

Reputation: 11

Unfortunately, we are not pre-compiling for 3.8 yet. If you can use Python 3.6 or 3.7, the problem should go away. https://pypi.org/project/grpcio/#files

I'm not recommending investigate the compilation of grpcio on Windows, because it is not easy to get it right.

-lidizheng

Upvotes: 1

Related Questions