0

I'm trying to install the google cloud sdk/google cloud text to speech on my Rasberry Pi 3+ and have tried do so for about 3 days now. I installed python 2.7.9 only to find out it was already installed on the Rpi.

I've tried both the linux and debian installation methods for gcloud and come up with the same exact errors for both methods.

I've tried installing hashlib and openssl packages to no avail and I've googled all I can. To my knowledge I have python 2.7.9 on my Rpi under /usr/local/bin.

Setting up libpython-stdlib:armhf (2.7.13-2) ... Setting up google-cloud-sdk (237.0.0-0) ... ERROR:root:code for hash md5 was not

found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha512 ERROR: gcloud failed to load: 'module' object has no attribute 'sha256' gcloud_main = _import_gcloud_main() import googlecloudsdk.gcloud_main from googlecloudsdk.api_lib.iamcredentials import util as iamcred_util from googlecloudsdk.api_lib.util import apis_internal from googlecloudsdk.core import properties from googlecloudsdk.core import config from googlecloudsdk.core.util import files as file_utils class Checksum(object): def __init(self, algorithm=hashlib.sha256):

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 executable: /usr/local/bin/python2

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.

If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here: https://cloud.google.com/sdk/ dpkg: error processing package google-cloud-sdk (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python (2.7.13-2) ... Setting up python-crcmod (1.7-2+b1) ... Errors were encountered while processing: google-cloud-sdk E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Do you have the openssl run time libraries. Once you install add it as an environment variable (using the export command) Try this https://stackoverflow.com/questions/20399331/error-importing-hashlib-with-python-2-7-but-not-with-2-6 – smitty_werbenjagermanjensen Mar 12 '19 at 11:58
  • Hey @JoeA I installed openssl both manually and through the terminal. I then tried to install the libssl stuff but it turns out that I already have that too. pi@raspberrypi:~ $ sudo apt-get install libssl-dev Reading package lists... Done Building dependency tree Reading state information... Done libssl-dev is already the newest version (1.1.0j-1~deb9u1). – Nick Seavert Mar 12 '19 at 22:34
  • Did you set the cloudsdk_python evironment which would be the following command: export CLOUDSDK_PYTHON=/usr/bin/python – smitty_werbenjagermanjensen Mar 13 '19 at 12:37

0 Answers0