Установка Google-cloud-хранилища данных застряла на grpcio

#python-3.x #google-app-engine #google-cloud-platform #google-cloud-datastore

#python-3.x #google-движок приложений #google-облачная платформа #google-облако-хранилище данных #google-app-engine #облачная платформа Google #google-cloud-datastore

Вопрос:

Я разрабатываю облачную оболочку Google для Google App Engine

Я могу использовать хранилище данных и все функции на 127.0.0.1, но перед переходом к производству мне нужно будет установить Google-cloud-datastore

Я использую следующую команду:

 pip install -t lib/ google-cloud-datastore --no-binary :all:
  

и получаем, как показано ниже:

 Collecting pyasn1<0.5.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.19.1->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-datastore)
  Using cached https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz
Skipping bdist_wheel for google-cloud-datastore, due to binaries being disabled for it.
Skipping bdist_wheel for google-api-core, due to binaries being disabled for it.
Skipping bdist_wheel for google-cloud-core, due to binaries being disabled for it.
Skipping bdist_wheel for googleapis-common-protos, due to binaries being disabled for it.
Skipping bdist_wheel for protobuf, due to binaries being disabled for it.
Skipping bdist_wheel for google-auth, due to binaries being disabled for it.
Skipping bdist_wheel for requests, due to binaries being disabled for it.
Skipping bdist_wheel for setuptools, due to binaries being disabled for it.
Skipping bdist_wheel for six, due to binaries being disabled for it.
Skipping bdist_wheel for pytz, due to binaries being disabled for it.
Skipping bdist_wheel for futures, due to binaries being disabled for it.
Skipping bdist_wheel for grpcio, due to binaries being disabled for it.
Skipping bdist_wheel for cachetools, due to binaries being disabled for it.
Skipping bdist_wheel for pyasn1-modules, due to binaries being disabled for it.
Skipping bdist_wheel for rsa, due to binaries being disabled for it.
Skipping bdist_wheel for chardet, due to binaries being disabled for it.
Skipping bdist_wheel for idna, due to binaries being disabled for it.
Skipping bdist_wheel for urllib3, due to binaries being disabled for it.
Skipping bdist_wheel for certifi, due to binaries being disabled for it.
Skipping bdist_wheel for enum34, due to binaries being disabled for it.
Skipping bdist_wheel for pyasn1, due to binaries being disabled for it.
ipython 5.10.0 has requirement prompt-toolkit<2.0.0,>=1.0.4, but you'll have prompt-toolkit 2.0.10 which is incompatible.
Installing collected packages: six, setuptools, protobuf, googleapis-common-protos, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, chardet, idna, urllib3, 
certifi, requests, pytz, futures, enum34, grpcio, google-api-core, google-cloud-core, google-cloud-datastore
  Running setup.py install for six ... done
  Running setup.py install for setuptools ... done
  Running setup.py install for protobuf ... done
  Running setup.py install for googleapis-common-protos ... done
  Running setup.py install for cachetools ... done
  Running setup.py install for pyasn1 ... done
  Running setup.py install for pyasn1-modules ... done
  Running setup.py install for rsa ... done
  Running setup.py install for google-auth ... done
  Running setup.py install for chardet ... done
  Running setup.py install for idna ... done
  Running setup.py install for urllib3 ... done
  Running setup.py install for certifi ... done
  Running setup.py install for requests ... done
  Running setup.py install for pytz ... done
  Running setup.py install for futures ... done
  Running setup.py install for enum34 ... done
  Running setup.py install for grpcio ... /
  

Последнее утверждение setup.py установка для grpcio выполняется за 25 минут до этого вопроса. сообщение.

Если я использую развертывание приложения gcloud без завершения установки pip google-cloud-datastore, я получаю, как и ожидалось:

    from google.cloud import datastore
ImportError: No module named cloud" 
  

Комментарии:

1. Вы пробовали это?: pip install -t lib/ google-cloud-datastore

2. Почему вы используете --no-binary :all: ?

3. Да, я пробовал pip install -t lib/ google-cloud-datastore , и у него была такая же проблема с setup.py при установке для grpcio. Использование --no-binary :all: заключалось в том, чтобы пропустить bdist_wheel в надежде, что это ускорит процесс. Я чувствую, что моя проблема в том, что я использую облачную оболочку Google, а не локальную разработку?

Ответ №1:

На случай, если кто-то другой пытается установить Google-cloud-datastore в облачную оболочку Google

У меня сработало следующее:

 sudo  apt-get install python3-venv
python3 -m venv venv_gcd
source venv_gcd/bin/activate
pip install google-cloud-datastore