python初心者で、すごい初歩的な質問だとは思いますが、行き詰まってしまったので、助けてください。
https://qiita.com/knyrc/items/7aab521edfc9bfb06625#%E4%BA%8B%E5%89%8D%E6%BA%96%E5%82%99
上記を参考にgoogle-cloud-speech
を使ってみたいのですが、Cloud Shellでpython transcribe.py gs://[パケット名]/[音声ファイル]
を打つと、ImportError: cannot import name speech
と表示されて動作しません。
$ python transcribe.py gs://[パケット名]/[音声ファイル] Traceback (most recent call last): File "transcribe.py", line 43, in <module> transcribe_gcs(args.path) File "transcribe.py", line 11, in transcribe_gcs from google.cloud import speech ImportError: cannot import name speech
Cloud Shellでpip list
を打ってみると、google-cloud-speech
が無いので、pip install google-cloud-speech
を打つと以下のように表示されます。
google-cloud-pubsub 0.26.0 has requirement google-cloud-core<0.26dev,>=0.25.0, but you'll have google-cloud-core 0.28.1 which is incompatible. gapic-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible. proto-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible. apache-beam 2.4.0 has requirement httplib2<0.10,>=0.8, but you'll have httplib2 0.11.3 which is incompatible. proto-google-cloud-datastore-v1 0.90.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible. googledatastore 7.0.1 has requirement httplib2<0.10,>=0.9.1, but you'll have httplib2 0.11.3 which is incompatible. googledatastore 7.0.1 has requirement oauth2client<4.0.0,>=2.0.1, but you'll have oauth2client 4.1.2 which is incompatible. Installing collected packages: google-cloud-speech, setuptools Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/google_cloud_speech-0.34.0-py3.6-nspkg.pth' Consider using the `--user` option or check the permissions.
必要な情報があれば、おっしゃってください。
よろしくお願い致します。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/28 23:42