1
resposta

falha em instalar o gclound

Ao executar o pip install pelo visual studio, recebo o seguinte erro:

pip install gcloud
----- Instalando 'gcloud' -----
Collecting gcloud
  Using cached https://files.pythonhosted.org/packages/11/ab/d0cee58db2d8445c26e6f5db25d9b1f1aa14a3ab30eea8ce77ae808d10ef/gcloud-0.18.3.tar.gz
Requirement already satisfied, skipping upgrade: httplib2>=0.9.1 in c:\program files\python36\lib\site-packages (from gcloud) (0.17.0)
Collecting googleapis-common-protos
  Using cached https://files.pythonhosted.org/packages/05/46/168fd780f594a4d61122f7f3dc0561686084319ad73b4febbf02ae8b32cf/googleapis-common-protos-1.51.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Program Files\Python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gabri\\AppData\\Local\\Temp\\pip-install-qmlmbwwp\\googleapis-common-protos\\setup.py'"'"'; __file__='"'"'C:\\Users\\gabri\\AppData\\Local\\Temp\\pip-install-qmlmbwwp\\googleapis-common-protos\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\gabri\AppData\Local\Temp\pip-install-qmlmbwwp\googleapis-common-protos\pip-egg-info'
         cwd: C:\Users\gabri\AppData\Local\Temp\pip-install-qmlmbwwp\googleapis-common-protos\
    Complete output (21 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Program Files\Python36\lib\site-packages\setuptools\__init__.py", line 10, in <module>
        from setuptools.extern.six.moves import filter, filterfalse, map
      File "C:\Program Files\Python36\lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
        from pkg_resources.extern import VendorImporter
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3017, in <module>
        @_call_aside
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
        f(*args, **kwargs)
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3045, in _initialize_master_working_set
        dist.activate(replace=False)
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2577, in activate
        declare_namespace(pkg)
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2151, in declare_namespace
        _handle_ns(packageName, path_item)
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
        _rebuild_mod_path(path, packageName, module)
      File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
        orig_path.sort(key=position_in_sys_path)
    AttributeError: '_NamespacePath' object has no attribute 'sort'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
----- Falha ao instalar 'gcloud' -----
1 resposta

Oi Jorge, como vai? Espero que esteja bem ^-^

Peço perdão pela demora em obter um retorno.

Para corrigir isso, tente atualizar o pip e o setuptools executando os seguintes comandos:

pip install --upgrade pip
pip install --upgrade setuptools

Após isso, tente novamente fazer a instalação do gcloud:

 pip install gcloud

Qualquer dúvida estou por aqui.

Abraços e bons estudos!