質問編集履歴
6
13
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
ImportError:
|
1
|
+
ImportError:
|
body
CHANGED
@@ -5,106 +5,4 @@
|
|
5
5
|
Python3.6.8
|
6
6
|
|
7
7
|
|
8
|
-
インストールしたのにImportError: No module named
|
9
|
-
|
10
|
-
エラーになるソースは以下です。
|
11
|
-
|
12
|
-
> from google.cloud import speech
|
13
|
-
> from google.cloud.speech import enums
|
14
|
-
> from google.cloud.speech import types
|
15
|
-
>
|
16
|
-
> from google.cloud import speech_v1 as speech
|
17
|
-
> from google.cloud.speech_v1 import enums
|
18
|
-
> from google.cloud.speech_v1 import types
|
19
|
-
|
20
|
-
実際のエラーは以下です。
|
21
|
-
#エラー
|
22
|
-
|
23
|
-
```ここに言語を入力
|
24
|
-
Traceback (most recent call last):
|
25
|
-
File "./app/trans.py", line 139, in <module>
|
26
|
-
samplename = transcribe_gcs(args.path)
|
27
|
-
File "./app/trans.py", line 39, in transcribe_gcs
|
28
|
-
from google.cloud import speech
|
29
|
-
ImportError: No module named google.cloud
|
30
|
-
```
|
31
|
-
|
32
|
-
39行目には以下3行が書いております。
|
33
|
-
```ここに言語を入力
|
34
|
-
from google.cloud import speech_v1 as speech
|
35
|
-
from google.cloud.speech_v1 import enums
|
36
|
-
from google.cloud.speech_v1 import types
|
37
|
-
```
|
38
|
-
|
39
|
-
139行目は
|
40
|
-
```ここに言語を入力
|
41
|
-
recog_result_text,finding_name = transcribe_gcs(args.path)
|
42
|
-
```
|
43
|
-
音声解析結果を戻り値としてrecog_result_textに格納しています。
|
44
|
-
|
45
|
-
#ためしたこと
|
46
|
-
|
47
|
-
インポートエラーとしてImportError: No module named google.cloudが表示されています。しかし
|
48
|
-
|
49
|
-
|
50
|
-
#インストール済関連モジュール
|
51
|
-
gcloud 0.18.3
|
52
|
-
google 2.0.2
|
53
|
-
google-api-core 1.14.2
|
54
|
-
google-auth 1.6.3
|
55
|
-
google-cloud 0.34.0
|
56
|
-
google-cloud-core 1.0.3
|
57
|
-
google-cloud-speech 1.2.0
|
58
|
-
google-cloud-storage 1.20.0
|
59
|
-
google-cloud-texttospeech 0.5.0
|
60
|
-
google-resumable-media 0.3.3
|
61
|
-
googleapis-common-protos 1.6.0
|
62
|
-
grpc-google-cloud-speech-v1 0.8.1
|
63
|
-
grpc-google-cloud-speech-v1beta1 1.0.1
|
64
|
-
|
65
|
-
|
66
|
-
上記でもlinuxのコマンドでも実際にインポートを実行しています。
|
67
|
-
さらに実際にインストールをコードを打ってもあたり前ですが以下エラーのように既にインストール済というエラーが出ます。
|
68
|
-
さらにアンインストールをしてもういちどインストールをしても上記エラーが出ます。
|
69
|
-
|
70
|
-
#正常に動いたコード
|
71
|
-
|
72
|
-
まずwindowsだとエラーはでないで正常稼働します。
|
73
|
-
さらにlinuxだとしても
|
74
|
-
from google.cloud import texttospeech は正常稼働します。しかし
|
75
|
-
from google.cloud import speech_v1 as speech では
|
76
|
-
from google.cloud import speech
|
77
|
-
ImportError: No module named google.cloud
|
78
|
-
というエラーではじかれます。versionを_v1を外してインポートしても同様のエラーが生じます。
|
79
|
-
|
80
|
-
#エラー
|
81
|
-
|
82
|
-
```ここに言語を入力
|
83
|
-
storage_speech_pyfile all_text Requirement already satisfied: google-cloud-storage in /usr/local/lib/python3.6/site-packages (1.19.0)
|
84
|
-
Requirement already satisfied: google-resumable-media>=0.3.1 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage) (0.3.3)
|
85
|
-
Requirement already satisfied: google-auth>=1.2.0 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage) (1.6.3)
|
86
|
-
Requirement already satisfied: google-cloud-core<2.0dev,>=1.0.3 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage) (1.0.3)
|
87
|
-
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from google-resumable-media>=0.3.1->google-cloud-storage) (1.12.0)
|
88
|
-
Requirement already satisfied: cachetools>=2.0.0 in /usr/local/lib/python3.6/site-packages (from google-auth>=1.2.0->google-cloud-storage) (3.1.1)
|
89
|
-
Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python3.6/site-packages (from google-auth>=1.2.0->google-cloud-storage) (4.0)
|
90
|
-
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/site-packages (from google-auth>=1.2.0->google-cloud-storage) (0.2.6)
|
91
|
-
Requirement already satisfied: google-api-core<2.0.0dev,>=1.14.0 in /usr/local/lib/python3.6/site-packages (from google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (1.14.2)
|
92
|
-
Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.6/site-packages (from rsa>=3.1.4->google-auth>=1.2.0->google-cloud-storage) (0.4.7)
|
93
|
-
Requirement already satisfied: protobuf>=3.4.0 in /usr/local/lib64/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (3.9.1)
|
94
|
-
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (1.6.0)
|
95
|
-
Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (2019.2)
|
96
|
-
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (2.22.0)
|
97
|
-
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (41.2.0)
|
98
|
-
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (2.8)
|
99
|
-
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (1.25.3)
|
100
|
-
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (2019.9.11)
|
101
|
-
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (3.0.4)
|
102
|
-
```
|
103
|
-
|
104
|
-
|
105
|
-
#参考URL
|
106
|
-
https://teratail.com/questions/123983
|
107
|
-
https://stackoverflow.com/questions/51644146/python-cant-find-google-cloud-module/51651971
|
108
|
-
https://stackoverflow.com/questions/54836399/modulenotfounderror-no-module-named-google-cloud
|
109
|
-
|
110
|
-
宜しくお願いします。
|
8
|
+
インストールしたのにImportError: No module named が出てしまいます。
|
5
987
title
CHANGED
File without changes
|
body
CHANGED
@@ -67,6 +67,16 @@
|
|
67
67
|
さらに実際にインストールをコードを打ってもあたり前ですが以下エラーのように既にインストール済というエラーが出ます。
|
68
68
|
さらにアンインストールをしてもういちどインストールをしても上記エラーが出ます。
|
69
69
|
|
70
|
+
#正常に動いたコード
|
71
|
+
|
72
|
+
まずwindowsだとエラーはでないで正常稼働します。
|
73
|
+
さらにlinuxだとしても
|
74
|
+
from google.cloud import texttospeech は正常稼働します。しかし
|
75
|
+
from google.cloud import speech_v1 as speech では
|
76
|
+
from google.cloud import speech
|
77
|
+
ImportError: No module named google.cloud
|
78
|
+
というエラーではじかれます。versionを_v1を外してインポートしても同様のエラーが生じます。
|
79
|
+
|
70
80
|
#エラー
|
71
81
|
|
72
82
|
```ここに言語を入力
|
4
15
title
CHANGED
File without changes
|
body
CHANGED
@@ -47,11 +47,22 @@
|
|
47
47
|
インポートエラーとしてImportError: No module named google.cloudが表示されています。しかし
|
48
48
|
|
49
49
|
|
50
|
-
|
50
|
+
#インストール済関連モジュール
|
51
|
+
gcloud 0.18.3
|
52
|
+
google 2.0.2
|
53
|
+
google-api-core 1.14.2
|
54
|
+
google-auth 1.6.3
|
55
|
+
google-cloud 0.34.0
|
56
|
+
google-cloud-core 1.0.3
|
57
|
+
google-cloud-speech 1.2.0
|
51
|
-
|
58
|
+
google-cloud-storage 1.20.0
|
59
|
+
google-cloud-texttospeech 0.5.0
|
52
|
-
|
60
|
+
google-resumable-media 0.3.3
|
53
|
-
|
61
|
+
googleapis-common-protos 1.6.0
|
62
|
+
grpc-google-cloud-speech-v1 0.8.1
|
63
|
+
grpc-google-cloud-speech-v1beta1 1.0.1
|
54
64
|
|
65
|
+
|
55
66
|
上記でもlinuxのコマンドでも実際にインポートを実行しています。
|
56
67
|
さらに実際にインストールをコードを打ってもあたり前ですが以下エラーのように既にインストール済というエラーが出ます。
|
57
68
|
さらにアンインストールをしてもういちどインストールをしても上記エラーが出ます。
|
@@ -80,20 +91,6 @@
|
|
80
91
|
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (3.0.4)
|
81
92
|
```
|
82
93
|
|
83
|
-
#インストール済関連モジュール
|
84
|
-
gcloud 0.18.3
|
85
|
-
google 2.0.2
|
86
|
-
google-api-core 1.14.2
|
87
|
-
google-auth 1.6.3
|
88
|
-
google-cloud 0.34.0
|
89
|
-
google-cloud-core 1.0.3
|
90
|
-
google-cloud-speech 1.2.0
|
91
|
-
google-cloud-storage 1.20.0
|
92
|
-
google-cloud-texttospeech 0.5.0
|
93
|
-
google-resumable-media 0.3.3
|
94
|
-
googleapis-common-protos 1.6.0
|
95
|
-
grpc-google-cloud-speech-v1 0.8.1
|
96
|
-
grpc-google-cloud-speech-v1beta1 1.0.1
|
97
94
|
|
98
95
|
#参考URL
|
99
96
|
https://teratail.com/questions/123983
|
3
あああ
title
CHANGED
File without changes
|
body
CHANGED
@@ -80,7 +80,7 @@
|
|
80
80
|
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (3.0.4)
|
81
81
|
```
|
82
82
|
|
83
|
-
#関連
|
83
|
+
#インストール済関連モジュール
|
84
84
|
gcloud 0.18.3
|
85
85
|
google 2.0.2
|
86
86
|
google-api-core 1.14.2
|
2
4
title
CHANGED
File without changes
|
body
CHANGED
@@ -80,6 +80,21 @@
|
|
80
80
|
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage) (3.0.4)
|
81
81
|
```
|
82
82
|
|
83
|
+
#関連module
|
84
|
+
gcloud 0.18.3
|
85
|
+
google 2.0.2
|
86
|
+
google-api-core 1.14.2
|
87
|
+
google-auth 1.6.3
|
88
|
+
google-cloud 0.34.0
|
89
|
+
google-cloud-core 1.0.3
|
90
|
+
google-cloud-speech 1.2.0
|
91
|
+
google-cloud-storage 1.20.0
|
92
|
+
google-cloud-texttospeech 0.5.0
|
93
|
+
google-resumable-media 0.3.3
|
94
|
+
googleapis-common-protos 1.6.0
|
95
|
+
grpc-google-cloud-speech-v1 0.8.1
|
96
|
+
grpc-google-cloud-speech-v1beta1 1.0.1
|
97
|
+
|
83
98
|
#参考URL
|
84
99
|
https://teratail.com/questions/123983
|
85
100
|
https://stackoverflow.com/questions/51644146/python-cant-find-google-cloud-module/51651971
|
1
3
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,6 +28,22 @@
|
|
28
28
|
from google.cloud import speech
|
29
29
|
ImportError: No module named google.cloud
|
30
30
|
```
|
31
|
+
|
32
|
+
39行目には以下3行が書いております。
|
33
|
+
```ここに言語を入力
|
34
|
+
from google.cloud import speech_v1 as speech
|
35
|
+
from google.cloud.speech_v1 import enums
|
36
|
+
from google.cloud.speech_v1 import types
|
37
|
+
```
|
38
|
+
|
39
|
+
139行目は
|
40
|
+
```ここに言語を入力
|
41
|
+
recog_result_text,finding_name = transcribe_gcs(args.path)
|
42
|
+
```
|
43
|
+
音声解析結果を戻り値としてrecog_result_textに格納しています。
|
44
|
+
|
45
|
+
#ためしたこと
|
46
|
+
|
31
47
|
インポートエラーとしてImportError: No module named google.cloudが表示されています。しかし
|
32
48
|
|
33
49
|
|
@@ -38,6 +54,7 @@
|
|
38
54
|
|
39
55
|
上記でもlinuxのコマンドでも実際にインポートを実行しています。
|
40
56
|
さらに実際にインストールをコードを打ってもあたり前ですが以下エラーのように既にインストール済というエラーが出ます。
|
57
|
+
さらにアンインストールをしてもういちどインストールをしても上記エラーが出ます。
|
41
58
|
|
42
59
|
#エラー
|
43
60
|
|